public void runTest() throws Throwable {
  Document doc;
  NodeList elementList;
  Node nameNode;
  CharacterData child;
  doc=(Document)load("hc_staff",true);
  elementList=doc.getElementsByTagName("acronym");
  nameNode=elementList.item(0);
  child=(CharacterData)nameNode.getFirstChild();
{
    boolean success=false;
    try {
      child.deleteData(-5,3);
    }
 catch (    DOMException ex) {
      success=(ex.code == DOMException.INDEX_SIZE_ERR);
    }
    assertTrue("throws_INDEX_SIZE_ERR",success);
  }
}

public void runTest ( ) throws Throwable { Document doc ; NodeList elementList ; Node nameNode ; CharacterData child ; doc = ( Document ) load ( "hc_staff" , true ) ; elementList = doc . getElementsByTagName ( "acronym" ) ; nameNode = elementList . item ( 0 ) ; child = ( CharacterData ) nameNode . getFirstChild ( ) ; { boolean success = false ; try { child . deleteData ( - 5 , 3 ) ; } catch ( DOMException ex ) { success = ( ex . code == DOMException . INDEX_SIZE_ERR ) ; } assertTrue ( "throws_INDEX_SIZE_ERR" , success ) ; } }
runs the test case .
