Thread: [Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/scannersTests CompositeTagScannerTest.java,1.55
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-12-08 13:14:02
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests In directory sc8-pr-cvs1:/tmp/cvs-serv763/tests/scannersTests Modified Files: CompositeTagScannerTest.java Log Message: Eliminate deprecation warnings. Clean up javadoc warnings. Index: CompositeTagScannerTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests/CompositeTagScannerTest.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** CompositeTagScannerTest.java 8 Dec 2003 01:31:55 -0000 1.55 --- CompositeTagScannerTest.java 8 Dec 2003 13:13:59 -0000 1.56 *************** *** 61,68 **** "SOMETHING" }; - public Tag createTag(Page page, int start, int end, Vector attributes, Tag startTag, Tag endTag, NodeList children) throws ParserException - { - return null; - } public String[] getID() { return arr; --- 61,64 ---- *************** *** 86,91 **** assertEquals("child count",0,customTag.getChildCount()); assertTrue("custom tag should be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",9,customTag.getStartTag().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 82,87 ---- assertEquals("child count",0,customTag.getChildCount()); assertTrue("custom tag should be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",9,customTag.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); *************** *** 99,104 **** assertEquals("child count",0,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 95,100 ---- assertEquals("child count",0,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); *************** *** 115,120 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 111,116 ---- assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); *************** *** 134,139 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("custom tag starting loc",0,customTag.getStartPosition ()); assertEquals("custom tag ending loc",24,customTag.getEndTag ().getEndPosition ()); --- 130,135 ---- assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("custom tag starting loc",0,customTag.getStartPosition ()); assertEquals("custom tag ending loc",24,customTag.getEndTag ().getEndPosition ()); *************** *** 163,168 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("custom tag starting loc",0,customTag.getStartPosition ()); assertEquals("custom tag ending loc",27,customTag.getEndTag ().getEndPosition ()); --- 159,164 ---- assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("custom tag starting loc",0,customTag.getStartPosition ()); assertEquals("custom tag ending loc",27,customTag.getEndTag ().getEndPosition ()); *************** *** 284,289 **** assertEquals("child count",0,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 280,285 ---- assertEquals("child count",0,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); *************** *** 297,302 **** assertEquals("child count",2,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 293,298 ---- assertEquals("child count",2,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); *************** *** 310,315 **** assertEquals("child count",3,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",1,customTag.getEndTag ().getEndingLineNumber()); --- 306,311 ---- assertEquals("child count",3,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",1,customTag.getEndTag ().getEndingLineNumber()); *************** *** 327,332 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("ending loc of custom tag",17,customTag.getEndTag ().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); --- 323,328 ---- assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("ending loc of custom tag",17,customTag.getEndTag ().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); *************** *** 357,362 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",9,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",17,customTag.getStartTag().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",1,customTag.getEndTag ().getEndingLineNumber()); --- 353,358 ---- assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",9,customTag.getStartPosition ()); ! assertEquals("ending loc",17,customTag.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",1,customTag.getEndTag ().getEndingLineNumber()); *************** *** 383,388 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); AnotherTag anotherTag = (AnotherTag)customTag.childAt(0); assertEquals("another tag ending loc",17,anotherTag.getEndPosition ()); --- 379,384 ---- assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); AnotherTag anotherTag = (AnotherTag)customTag.childAt(0); assertEquals("another tag ending loc",17,anotherTag.getEndPosition ()); *************** *** 414,419 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 410,415 ---- assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); *************** *** 453,458 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().getStartPosition ()); ! assertEquals("ending loc",8,customTag.getStartTag().getEndPosition ()); AnotherTag anotherTag = (AnotherTag)customTag.childAt(0); assertEquals("anotherTag child count",2,anotherTag.getChildCount()); --- 449,454 ---- assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartPosition ()); ! assertEquals("ending loc",8,customTag.getEndPosition ()); AnotherTag anotherTag = (AnotherTag)customTag.childAt(0); assertEquals("anotherTag child count",2,anotherTag.getChildCount()); *************** *** 623,642 **** return MATCH_NAME; } - - public Tag createTag (Page page, int start, int end, Vector attributes, Tag startTag, Tag endTag, NodeList children) throws ParserException - { - CustomTag ret; - - ret = new CustomTag (selfChildrenAllowed); - ret.setPage (page); - ret.setStartPosition (start); - ret.setEndPosition (end); - ret.setAttributesEx (attributes); - ret.setStartTag (startTag); - ret.setEndTag (endTag); - ret.setChildren (children); - - return (ret); - } } --- 619,622 ---- *************** *** 658,676 **** } - public Tag createTag (Page page, int start, int end, Vector attributes, Tag startTag, Tag endTag, NodeList children) throws ParserException - { - AnotherTag ret; - - ret = new AnotherTag (acceptCustomTagsButDontAcceptCustomEndTags); - ret.setPage (page); - ret.setStartPosition (start); - ret.setEndPosition (end); - ret.setAttributesEx (attributes); - ret.setStartTag (startTag); - ret.setEndTag (endTag); - ret.setChildren (children); - - return (ret); - } protected boolean isBrokenTag() { return false; --- 638,641 ---- |