W3C home > Mailing lists > Public > www-dom-ts@w3.org > March 2002

Re: How do I generate test suite code for C?

From: Curt Arnold <carnold@houston.rr.com>
Date: Sat, 16 Mar 2002 10:41:07 -0600
Message-ID: <000701c1cd09$5f02bfe0$a800a8c0@CurtMicron>
To: <www-dom-ts@w3.org>
Michael B Allan wrote:
> I'm the author of a plain C implementation called DOMC. I would like to
> generate conformance test sources like:

Welcome.  Yes, the right approach is to create a new transform
test-to-domc.xsl that would generate source code compatible with your C
binding and your selected test harness.  If you aren't already using a test
harness, there is a list of xUnit implementations at
http://www.xprogramming.com/software.htm  Though the tests can be adapted to
other frameworks, the Java code outputs JUnit style assertions.

The packaged test suite is basically a binary drop, to build your own
transforms you need to get the sources out of the CVS.  See
http://www.w3.org/DOM/Test/Documents/DOMTSBuild.html for details on how to
access the CVS repository and build the test suite.

Then I would manually convert some of the tests to your DOM binding and
selected test framework, write the necessary supporting code (the C
equivalent of DOMTestCase.java), get those tests running, and then create
test-to-domc.xsl from test-to-java.xsl.  test-to-java is numbingly complex,
so if you get a few manual tests up and running, then we could collaborate
to get test-to-domc to produce the code.

We have yet to do any test suites for anything other than the two official
bindings, Java and ECMAScript.  There has been a desire to incorporate test
generation for other bindings (Python and C#+System.XML in particular) in
the package, but the need for sleep has precluded doing anything serious on
it.  I don't know if you'd be interested in trying to tackle both DOMC and
other C bindings like libxml as a combined effort that could be contributed
to the W3C.

We are using Ant (http://jakarta.apache.org/ant) as our build tool.
Coincidentally, I've been working on a C/C++ compilation task for Ant as
part of http://ant-contrib.sourceforge.net which might be useful later.
Received on Saturday, 16 March 2002 11:41:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:04 UTC