Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/visitorsTests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31556/tests/visitorsTests
Modified Files:
NodeVisitorTest.java ScriptCommentTest.java
Log Message:
Part two of a multiphase refactoring. Part one added the Tag interface.
This submission eliminates some of the duplication between the lexer.nodes package
and the htmlparser package by removing the tag specific signatures, visitTitleTag,
visitLinkTag and visitImageTag, from the NodeVisitor class. This allows the lexer to
return htmlparser level classes for StringNode and RemarkNode. The TagNode is
still present in the lexer.nodes package, but will move next.
This means that classes derived from NodeVisitor *will not* work using the above
signatures; instead a check for tag class (or name) should be performed in visitTag.
A document will be added to the visitors package with comprehensive porting instructions.
Index: ScriptCommentTest.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/visitorsTests/ScriptCommentTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ScriptCommentTest.java 22 May 2004 03:57:31 -0000 1.1
--- ScriptCommentTest.java 24 May 2004 00:38:19 -0000 1.2
***************
*** 29,33 ****
import org.htmlparser.tags.CompositeTag;
import org.htmlparser.tags.ScriptTag;
! import org.htmlparser.tags.Tag;
import org.htmlparser.tests.ParserTestCase;
import org.htmlparser.visitors.NodeVisitor;
--- 29,33 ----
import org.htmlparser.tags.CompositeTag;
import org.htmlparser.tags.ScriptTag;
! import org.htmlparser.Tag;
import org.htmlparser.tests.ParserTestCase;
import org.htmlparser.visitors.NodeVisitor;
Index: NodeVisitorTest.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/visitorsTests/NodeVisitorTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** NodeVisitorTest.java 2 Jan 2004 16:24:57 -0000 1.14
--- NodeVisitorTest.java 24 May 2004 00:38:19 -0000 1.15
***************
*** 31,35 ****
import org.htmlparser.StringNode;
! import org.htmlparser.tags.Tag;
import org.htmlparser.tests.ParserTestCase;
import org.htmlparser.visitors.NodeVisitor;
--- 31,35 ----
import org.htmlparser.StringNode;
! import org.htmlparser.Tag;
import org.htmlparser.tests.ParserTestCase;
import org.htmlparser.visitors.NodeVisitor;
|