[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/lexerTests TagTests.java,1.3,1.4
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-11-01 04:03:24
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/lexerTests In directory sc8-pr-cvs1:/tmp/cvs-serv2709/lexerTests Modified Files: TagTests.java Log Message: Fixed all tests failing if case sensitivity was turned on. Mostly this involved comparing the output from toHtml() with the string passed to the parser. Now ParserTestCase does case sensitive comparisons. Index: TagTests.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/lexerTests/TagTests.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TagTests.java 26 Oct 2003 19:46:25 -0000 1.3 --- TagTests.java 1 Nov 2003 04:03:21 -0000 1.4 *************** *** 103,108 **** } ! public void testEmptyTag() throws Exception { ! createParser("<custom/>"); parseAndAssertNodeCount(1); assertType("should be Tag",Tag.class,node[0]); --- 103,110 ---- } ! public void testEmptyTag() throws Exception ! { ! String html = "<custom/>"; ! createParser(html); parseAndAssertNodeCount(1); assertType("should be Tag",Tag.class,node[0]); *************** *** 112,116 **** assertStringEquals( "html", ! "<CUSTOM/>", tag.toHtml() ); --- 114,118 ---- assertStringEquals( "html", ! html, tag.toHtml() ); *************** *** 400,409 **** public void testStandAloneToHTML () throws ParserException { ! createParser("<input disabled>"); parseAndAssertNodeCount (1); assertType ("should be Tag", Tag.class, node[0]); Tag tag = (Tag)node[0]; ! String html = tag.toHtml (); ! assertStringEquals ("html","<INPUT DISABLED>", html); } --- 402,411 ---- public void testStandAloneToHTML () throws ParserException { ! String html = "<input disabled>"; ! createParser(html); parseAndAssertNodeCount (1); assertType ("should be Tag", Tag.class, node[0]); Tag tag = (Tag)node[0]; ! assertStringEquals ("html", html, tag.toHtml ()); } *************** *** 413,422 **** public void testMissingValueToHTML () throws ParserException { ! createParser("<input disabled=>"); parseAndAssertNodeCount (1); assertType ("should be Tag", Tag.class, node[0]); Tag tag = (Tag)node[0]; ! String html = tag.toHtml (); ! assertStringEquals ("html","<INPUT DISABLED=>", html); } } --- 415,424 ---- public void testMissingValueToHTML () throws ParserException { ! String html = "<input disabled=>"; ! createParser(html); parseAndAssertNodeCount (1); assertType ("should be Tag", Tag.class, node[0]); Tag tag = (Tag)node[0]; ! assertStringEquals ("html", html, tag.toHtml ()); } } |