|
Post by R on Feb 2, 2002 22:24:00 GMT -5
You dun't need to post all of the possible outcomes... just 1 is enough. We should still write our own conditions for the test.
Or am I asking too much already?
|
|
|
Post by Random_Death on Feb 3, 2002 22:15:38 GMT -5
Guess, we're all to lazy. Plus that moving pic makes us dizzy.
|
|
|
Post by Sylph on Feb 3, 2002 22:19:00 GMT -5
remember to make sure that if there are no more links or link tags or whatever in LinkIterator, next() returns null, and next() again should return null.
|
|
|
Post by SquirrelHunterPro on Feb 4, 2002 12:44:23 GMT -5
|
|
|
Post by Random_Death on Feb 4, 2002 21:57:39 GMT -5
You crazy with all those rolling eyes? Anyhow, HTML is easy stuff. it's much easier then java.
|
|
|
Post by Yingster on Feb 6, 2002 10:40:57 GMT -5
just one test case, hope this helps
out = new PrintStream(new FileOutputStream("test.html")); out.println("< a foo"); out.println("="); out.println(""); out.println(""); out.println("\"bar\" href = \"sample<.html\""); out.println(" >"); in = new BufferedReader(new FileReader("test.html")); ti = new TagIterator(in); result = (String)ti.next(); hasNext = ti.hasNext(); if (hasNext==true){ System.out.println("Case 7(hasNext) failed."); }else if(result == null || !result.equals("< a foo=\"bar\" href = \"sample<.html\" >")){ System.out.println("Case 7(next) failed."); }
|
|
|
Post by Bahamut on Feb 6, 2002 17:24:38 GMT -5
Wow, all that to test one tag. Why not just create an html file in code warrior, type a tag you want to test, and print all the tags you've extracted to the Java console? Do all of this in a main class.
|
|