- From: Freek de Bruijn <freek@x-hive.com>
- Date: Mon, 20 Aug 2001 14:02:25 +0200
- To: <www-dom-ts@w3.org>
I would like to compliment the active members of this mailing list for all the progress that has been accomplished so far. It takes a little bit of work to get everything to work, but it is really nice that (almost?) everything is automated using Ant, SED, patch, etc. I did not have the org.apache.testlet package available, so I added excludes="Avalon*.*" to the javac task in the junit-run target. By the way, the Avalon Development Team has decided to discontinue development of Testlet in favor of the JUnit testing framework (see http://jakarta.apache.org/avalon/), so maybe we want to encourage people to use the JUnit option for Java. One small issue: - The nodeclonenodefalse test seems to fail because the expectedResult list contains two Strings, while the result list contains a String and an Integer. This could be fixed by removing the quotes for the second member of expectedResult (<member>0</member>), but it could also be rewritten as indicated below. Original test: <var name="doc" type="Document"/> <var name="elementList" type="NodeList"/> <var name="employeeNode" type="Node"/> <var name="clonedNode" type="Node"/> <var name="cloneName" type="DOMString"/> <var name="cloneChildren" type="NodeList"/> <var name="length" type="int"/> <var name="result" type="List"/> <var name="expectedResult" type="List"> <member>"employee"</member> <member>"0"</member> </var> <load var="doc" href="staff.xml" willBeModified="false"/> <getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/> <item interface="NodeList" obj="elementList" index="1" var="employeeNode"/> <cloneNode obj="employeeNode" deep="false" var="clonedNode"/> <nodeName obj="clonedNode" var="cloneName"/> <append collection="result" obj="cloneName"/> <childNodes obj="clonedNode" var="cloneChildren"/> <length interface="NodeList" obj="cloneChildren" var="length"/> <append collection="result" obj="length"/> <assertEquals actual="result" expected="expectedResult" id="nodeCloneNodeFalseAssert1" ignoreCase="false"/> Modified version: <var name="doc" type="Document"/> <var name="elementList" type="NodeList"/> <var name="employeeNode" type="Node"/> <var name="clonedNode" type="Node"/> <var name="cloneName" type="DOMString"/> <var name="cloneChildren" type="NodeList"/> <var name="length" type="int"/> <load var="doc" href="staff.xml" willBeModified="false"/> <getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/> <item interface="NodeList" obj="elementList" index="1" var="employeeNode"/> <cloneNode obj="employeeNode" deep="false" var="clonedNode"/> <nodeName obj="clonedNode" var="cloneName"/> <assertEquals actual="cloneName" expected=""employee"" id="nodeCloneNodeFalseAssert1" ignoreCase="false"/> <childNodes obj="clonedNode" var="cloneChildren"/> <length interface="NodeList" obj="cloneChildren" var="length"/> <assertEquals actual="length" expected="0" id="nodeCloneNodeFalseAssert2"/> The modified version asserts that the nodeName is equal to "employee" and that the cloned node has no children without using two lists. Maybe the first version was easier to generate from the original tests, but I would prefer the modified version for new tests, because it is shorter. --- Freek -----Original Message----- From: www-dom-ts-request@w3.org [mailto:www-dom-ts-request@w3.org]On Behalf Of Curt Arnold Sent: Monday 20 August 2001 9:08 To: www-dom-ts@w3.org Subject: Full compile, almost ready to run I got a lot done today (and tonight and early the next morning). As I have a conference call in less than 6 hours, I have to crash. The source in the CVS will DTD validate, schema validate, generate java code, compile and jar. The only things missing to run is the definition of a test suite (which should take all of a few minutes by capturing the output of a dir or ls depending on OS preference). The "junit-run" target which produces the JUnit adapter jar apparently has some problem. Probably induced by the "avalon-run" target which still works. I did the build with a CVS build of Ant and Xalan 2.1. Two test files would cause Xalan 2.1 to lock up (look in build.xml for excludes to see the particular names). These files could be transformed using Xalan 2.2 D9 or Saxon, however Xalan 2.2 had many problems with Ant, so it was easier just to exclude them for the time being. I used Sun's MSV (multischema validator, http://www.sun.com/software/xml/developers/multischema/;$sessionid$OHJQS FIAACAN3AMTA1FU5YQ) to check the tests against the schemas which will identify underdeclared variables and bad literals before starting the generation and compile steps. To run MSV: java -jar \msv-20010719\msv.jar build\dom1.xsd tests\level1\cases\*.xml
Received on Monday, 20 August 2001 08:02:28 UTC