Thread: [Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/scannersTests CompositeTagScannerTest.java,1.48
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-11-01 01:37:00
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests In directory sc8-pr-cvs1:/tmp/cvs-serv16662/tests/scannersTests Modified Files: CompositeTagScannerTest.java Log Message: Remove deprecated method calls: elementBegin()->getStartPosition() elementEnd()->getEndPosition() Index: CompositeTagScannerTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests/CompositeTagScannerTest.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** CompositeTagScannerTest.java 31 Oct 2003 12:56:09 -0000 1.48 --- CompositeTagScannerTest.java 1 Nov 2003 01:36:57 -0000 1.49 *************** *** 84,89 **** assertEquals("child count",0,customTag.getChildCount()); assertTrue("custom tag should be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",9,customTag.getStartTag().elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 84,89 ---- 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()); *************** *** 97,102 **** assertEquals("child count",0,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 97,102 ---- 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()); *************** *** 113,118 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 113,118 ---- 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()); *************** *** 132,139 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); ! assertEquals("custom tag starting loc",0,customTag.elementBegin()); ! assertEquals("custom tag ending loc",24,customTag.elementEnd()); Node child = customTag.childAt(0); --- 132,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.getEndPosition ()); Node child = customTag.childAt(0); *************** *** 153,168 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); ! assertEquals("custom tag starting loc",0,customTag.elementBegin()); ! assertEquals("custom tag ending loc",27,customTag.elementEnd()); Node child = customTag.childAt(0); assertType("child",AnotherTag.class,child); AnotherTag tag = (AnotherTag)child; ! assertEquals("another tag start pos",8,tag.elementBegin()); ! assertEquals("another tag ending pos",18,tag.elementEnd()); ! assertEquals("custom end tag start pos",18,customTag.getEndTag().elementBegin()); assertStringEquals("child html",childtag,child.toHtml()); } --- 153,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.getEndPosition ()); Node child = customTag.childAt(0); assertType("child",AnotherTag.class,child); AnotherTag tag = (AnotherTag)child; ! assertEquals("another tag start pos",8,tag.getStartPosition ()); ! assertEquals("another tag ending pos",18,tag.getEndPosition ()); ! assertEquals("custom end tag start pos",18,customTag.getEndTag().getStartPosition ()); assertStringEquals("child html",childtag,child.toHtml()); } *************** *** 262,267 **** assertEquals("child count",0,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 262,267 ---- 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()); *************** *** 275,280 **** assertEquals("child count",2,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 275,280 ---- 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()); *************** *** 288,293 **** assertEquals("child count",3,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",1,customTag.getEndingLineNumber()); --- 288,293 ---- 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.getEndingLineNumber()); *************** *** 305,311 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); ! assertEquals("ending loc of custom tag",17,customTag.elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 305,311 ---- 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.getEndPosition ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); *************** *** 331,336 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",9,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",17,customTag.getStartTag().elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",1,customTag.getEndingLineNumber()); --- 331,336 ---- 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.getEndingLineNumber()); *************** *** 349,356 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); AnotherTag anotherTag = (AnotherTag)customTag.childAt(0); ! assertEquals("another tag ending loc",17,anotherTag.elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 349,356 ---- 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 ()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); *************** *** 371,376 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); assertEquals("starting line position",0,customTag.getStartingLineNumber()); assertEquals("ending line position",0,customTag.getEndingLineNumber()); --- 371,376 ---- 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()); *************** *** 402,412 **** assertEquals("child count",1,customTag.getChildCount()); assertFalse("custom tag should not be xml end tag",customTag.isEmptyXmlTag()); ! assertEquals("starting loc",0,customTag.getStartTag().elementBegin()); ! assertEquals("ending loc",8,customTag.getStartTag().elementEnd()); AnotherTag anotherTag = (AnotherTag)customTag.childAt(0); assertEquals("anotherTag child count",2,anotherTag.getChildCount()); ! assertEquals("anotherTag end loc",27,anotherTag.elementEnd()); ! assertEquals("custom end tag begin loc",27,customTag.getEndTag().elementBegin()); ! assertEquals("custom end tag end loc",36,customTag.getEndTag().elementEnd()); } --- 402,412 ---- 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()); ! assertEquals("anotherTag end loc",27,anotherTag.getEndPosition ()); ! assertEquals("custom end tag begin loc",27,customTag.getEndTag().getStartPosition ()); ! assertEquals("custom end tag end loc",36,customTag.getEndTag().getEndPosition ()); } |