From: <bo...@us...> - 2007-04-12 09:07:11
|
Revision: 178 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=178&view=rev Author: bodewig Date: 2007-04-12 02:07:12 -0700 (Thu, 12 Apr 2007) Log Message: ----------- whitespace changes only Modified Paths: -------------- trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2007-04-12 04:43:38 UTC (rev 177) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2007-04-12 09:07:12 UTC (rev 178) @@ -447,14 +447,15 @@ compareAttribute(nextAttr, compareTo, listener); if (!XMLUnit.getIgnoreAttributeOrder()) { - Attr attributeItem = (Attr) testAttr.item(i); - String testAttrName = "[attribute absent]"; - if (attributeItem != null) { - testAttrName = getUnNamespacedNodeName(attributeItem); + Attr attributeItem = (Attr) testAttr.item(i); + String testAttrName = "[attribute absent]"; + if (attributeItem != null) { + testAttrName = + getUnNamespacedNodeName(attributeItem); + } + compare(attrName, testAttrName, + nextAttr, compareTo, listener, ATTR_SEQUENCE); } - compare(attrName, testAttrName, - nextAttr, compareTo, listener, ATTR_SEQUENCE); - } } else { compare(attrName, null, control, test, listener, ATTR_NAME_NOT_FOUND); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2007-05-18 10:37:41
|
Revision: 211 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=211&view=rev Author: bodewig Date: 2007-05-18 03:37:41 -0700 (Fri, 18 May 2007) Log Message: ----------- minor refactoring Modified Paths: -------------- trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2007-05-18 05:25:53 UTC (rev 210) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2007-05-18 10:37:41 UTC (rev 211) @@ -69,6 +69,7 @@ public class DifferenceEngine implements DifferenceConstants { private static final String NULL_NODE = "null"; private static final String NOT_NULL_NODE = "not null"; + private static final String ATTRIBUTE_ABSENT = "[attribute absent]"; private final ComparisonController controller; private final XpathNodeTracker controlTracker; private final XpathNodeTracker testTracker; @@ -485,11 +486,11 @@ NamedNodeMap testAttr, DifferenceListener listener) throws DifferenceFoundException { - ArrayList allTestAttrs = new ArrayList(); + ArrayList unmatchedTestAttrs = new ArrayList(); for (int i=0; i < testAttr.getLength(); ++i) { Attr nextAttr = (Attr) testAttr.item(i); if (!isXMLNSAttribute(nextAttr)) { - allTestAttrs.add(nextAttr); + unmatchedTestAttrs.add(nextAttr); } } @@ -510,7 +511,7 @@ } if (compareTo != null) { - allTestAttrs.remove(compareTo); + unmatchedTestAttrs.remove(compareTo); } if (isRecognizedXMLSchemaInstanceAttribute(nextAttr)) { @@ -523,7 +524,7 @@ if (!XMLUnit.getIgnoreAttributeOrder()) { Attr attributeItem = (Attr) testAttr.item(i); - String testAttrName = "[attribute absent]"; + String testAttrName = ATTRIBUTE_ABSENT; if (attributeItem != null) { testAttrName = getUnNamespacedNodeName(attributeItem); @@ -538,7 +539,7 @@ } } - for (Iterator iter = allTestAttrs.iterator(); iter.hasNext(); ) { + for (Iterator iter = unmatchedTestAttrs.iterator(); iter.hasNext(); ) { Attr nextAttr = (Attr) iter.next(); if (isRecognizedXMLSchemaInstanceAttribute(nextAttr)) { compareRecognizedXMLSchemaInstanceAttribute(null, nextAttr, @@ -616,8 +617,8 @@ testTracker.visited(test); } - compare(control != null ? control.getValue() : "[not specified]", - test != null ? test.getValue() : "[not specified]", + compare(control != null ? control.getValue() : ATTRIBUTE_ABSENT, + test != null ? test.getValue() : ATTRIBUTE_ABSENT, control, test, listener, d); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2008-03-04 09:26:32
|
Revision: 242 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=242&view=rev Author: bodewig Date: 2008-03-04 01:26:31 -0800 (Tue, 04 Mar 2008) Log Message: ----------- control nodes are visited in document order, no need to prefill child list Modified Paths: -------------- trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2008-03-03 16:26:08 UTC (rev 241) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2008-03-04 09:26:31 UTC (rev 242) @@ -356,7 +356,6 @@ int j = 0; final int lastTestNode = testChildren.size() - 1; - controlTracker.preloadChildList(controlChildren); testTracker.preloadChildList(testChildren); HashMap/*<Node, Node>*/ matchingNodes = new HashMap(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2008-03-04 09:27:36
|
Revision: 243 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=243&view=rev Author: bodewig Date: 2008-03-04 01:27:42 -0800 (Tue, 04 Mar 2008) Log Message: ----------- fix indentation Modified Paths: -------------- trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java =================================================================== --- trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2008-03-04 09:26:31 UTC (rev 242) +++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2008-03-04 09:27:42 UTC (rev 243) @@ -414,9 +414,10 @@ unmatchedTestNodes.remove(0); } if (nextTest != null) { - compareNode(nextControl, nextTest, listener, elementQualifier); - compare(new Integer(i), testIndex, - nextControl, nextTest, listener, CHILD_NODELIST_SEQUENCE); + compareNode(nextControl, nextTest, listener, elementQualifier); + compare(new Integer(i), testIndex, + nextControl, nextTest, listener, + CHILD_NODELIST_SEQUENCE); } else { missingNode(nextControl, null, listener); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |