Re: SV: C language binding

I've been working on taking the DOM Level 1 tests,
written in Java and ECMAScript, and defining the
test scenarios using XML.  I've already written a
stylesheet to take the test scenario's file and translate
them into a set of Java methods to test a variety of
interfaces.  Next, I'm going to try to
write a stylesheet to produce ECMAScript tests --
if I can get this to work, I feel fairly confident that
we could do the same for any other bindings, so that
we would have one set of common test scenarios, and generated tests for each
binding.  I'll forward real
examples early next week, but the basic idea is to set up
a set of ENTITY definitions for each binding and a
conditional include that toggles between various bindings.

Within the XML file, the test scenarios are defined like so:

<TEST ID="test_name" CATEGORY="category name"  INTERFACE="interface name>
<DESCRIPTION> test description goes here </DESCRIPTION>
<EXPECTED RESULTS> expected results go here </EXPECTED RESULTS>
<TEST SCENARIO>
<CALL NAME=&idlname; TYPE=&return_type; > describe what you want to do in
this step
<PARAM VALUE="parameter value" />
   zero or more of these
</CALL>

.... there may be a series of calls for this test scenario ...

</TEST SCENARIO>

We've successfully generated several tests already for all of the
NODETYPES -- I have
some more work to do on the DTD to handle additional cases, but this
approach looks
promising.  As it currently stands, the XSLT file is only 65 lines of code!
I don't expect that
it will be more than a couple of hundred before I'm through.  So, I expect
that generating
similar transformations for additional languages will be trivial.

Comments?

--Mary
NIST, Conformance Testing
mbrady@nist.gov

----- Original Message -----
From: "Dimitris Dimitriadis" <dimitris.dimitriadis@improve.se>
To: "'Stanley Guan'" <Stanley.Guan@oracle.com>
Cc: <www-dom-ts@w3.org>
Sent: Friday, March 16, 2001 2:20 PM
Subject: SV: SV: C language binding


> Hi Stanley
>
> We've been thinking along these lines, but the test suite that will be the
> base for the DOM Level 1 TS is written in Java/ECMA Script.
>
> However, I'm very keen on seeing a thread on common interfaces here on
this
> list as it is an activity that is going on within the W3C and I, among
other
> people are quite interested. There are some difficulties, but I think once
> written, reusability is greatly enhanced.
>
> What do others think?
>
> /D
>
> -----Ursprungligt meddelande-----
> Från: Stanley Guan [mailto:Stanley.Guan@oracle.com]
> Skickat: den 16 mars 2001 20:13
> Till: www-dom-ts@w3.org
> Kopia: www-dom-ts@w3.org
> Ämne: Re: SV: C language binding
>
>
> Dimitris,
>
> Maybe a function table (or callback structure) can be used to map
> proprietary interface to a common interface and the test suite can be
> written in this common interface.
>
> To enable the mapping, maybe a wrapper is needed for a proprietary
> interface.  Alas, this is a conformance test, not a benchmark.  So, one
> extra layer doesn't hurt.
>
> But, to come up with a common interface could be a big effort.
>
> Thx,
>
> -Stanley
>
> Dimitris Dimitriadis wrote:
>
> > Hello Stanley
> >
> > The two language bindings that will be provided are Java and ECMAScript.
> > However, we would encourage people to help us think on whether other
> > languages bindings should be produced.
> >
> > /Dimitris
> >
> > -----Ursprungligt meddelande-----
> > Från: Stanley Guan [mailto:Stanley.Guan@oracle.com]
> > Skickat: den 16 mars 2001 19:25
> > Till: www-dom-ts@w3.org
> > Ämne: C language binding
> >
> > Hi,
> >
> > Have you taken C language binding into consideration?  Since
> > there is no standard C interface, how do you want to proceed?
> >
> > Thx,
> >
> > -Stanley
>
>

Received on Friday, 16 March 2001 15:34:25 UTC