[Htmlparser-cvs] htmlparser/src/org/htmlparser/tests/temporaryFailures AttributeParserTest.java,1.14
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-09-28 19:37:34
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/temporaryFailures In directory sc8-pr-cvs1:/tmp/cvs-serv30684/tests/temporaryFailures Modified Files: AttributeParserTest.java Log Message: Lexer Integration Removed old Parser classes. Removed EndTag, this class was replaced by a call to the new isEndTag() method on the Tag class The StringNode, RemarkNode and tags.Tag class now derive from their lexeme counterparts in lexer.nodes instead of the other way around. The beginnings of a node factory interface are included. This was added so the lexer could return 'visitable' nodes to the parser. The parser acts as it's own node factory, as does the Lexer. The node count for parsing goes up in most cases because every whitespace (i.e. newline) now counts as a StringNode. This has whacked out a lot of the tests that were expecting fewer nodes or a certain type of node at a particular index. Attributes now maintain their order and case. The count of attributes also went up because whitespace is maintained within tags too. The storage in a Vector means the element 0 Attribute is actually the name of the tag, rather than having the $TAGNAME entry in a HashTable. Index: AttributeParserTest.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/temporaryFailures/AttributeParserTest.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AttributeParserTest.java 22 Sep 2003 02:40:13 -0000 1.14 --- AttributeParserTest.java 28 Sep 2003 15:33:59 -0000 1.15 *************** *** 38,42 **** import org.htmlparser.Parser; - import org.htmlparser.parserHelper.AttributeParser; import org.htmlparser.tags.Tag; import org.htmlparser.tags.data.TagData; --- 38,41 ---- *************** *** 44,48 **** public class AttributeParserTest extends ParserTestCase { - private AttributeParser parser; private Tag tag; private Hashtable table; --- 43,46 ---- *************** *** 53,63 **** protected void setUp() { ! parser = new AttributeParser(); } public void getParameterTableFor(String tagContents) { ! tag = new Tag(new TagData(0,0,tagContents,"")); ! table = parser.parseAttributes(tag.getText ()); ! } --- 51,62 ---- protected void setUp() { ! //parser = new AttributeParser(); ! fail ("needs to be reworked"); } public void getParameterTableFor(String tagContents) { ! fail ("needs to be reworked"); ! // tag = new Tag(new TagData(0,0,tagContents,"")); ! // table = parser.parseAttributes(tag.getText ()); } |