From 84ca5a6556c402bd8f842d3d3bc9a9e748c5ef1f Mon Sep 17 00:00:00 2001 From: James Shaw Date: Sun, 22 Jul 2007 11:54:12 +0000 Subject: Rewritten produce-specific-attribute to handle casts properly. IDL to C names are now held in ctypes.xml. produce-specific-method and are not yet reimplemented. svn path=/trunk/dom/; revision=3457 --- test/transform/ctypes.xml | 56 ++++++ test/transform/test-to-c.xsl | 417 ++++++++++++++++++------------------------- 2 files changed, 233 insertions(+), 240 deletions(-) create mode 100644 test/transform/ctypes.xml (limited to 'test') diff --git a/test/transform/ctypes.xml b/test/transform/ctypes.xml new file mode 100644 index 0000000..f8ed696 --- /dev/null +++ b/test/transform/ctypes.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dom_node_type + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/transform/test-to-c.xsl b/test/transform/test-to-c.xsl index d5d59f3..9b56fcd 100644 --- a/test/transform/test-to-c.xsl +++ b/test/transform/test-to-c.xsl @@ -5,13 +5,24 @@ test representation. --> + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + dom1-interfaces.xml + + + ctypes.xml http://www.w3.org/2001/DOM-Test-Suite/tests/Level-1/ - + @@ -39,7 +50,6 @@ we generate an reporting that the element is not known. - @@ -51,9 +61,7 @@ we generate an reporting that the element is not known. - - - + @@ -141,25 +149,25 @@ Language construct templates - - + + ; - + if () { - - - } - - else { - - + + } - - + + else { + + + } + + @@ -177,44 +185,18 @@ DOM templates - - - - - - - - - - - - - - ( - - - , - - - - , & - - ); - - - @@ -222,97 +204,159 @@ DOM templates - - - + - + + - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + attribute-cname: + + + + + + + + + + + + + + err = + + _set_ + - - err = - - - + + + + _get_ - - - + ( - - - + + - + , - - - - + + + - & - ); + & + + ); + + assert(err == DOM_NO_ERR); + - + + - - - - - - - - ( - - - - ) - - + + + + + + + + + + + + + + + + + + + + + + ( + + + + ) + - - - - - + + + + - - ( - - - - ) + + + + + @@ -338,152 +382,45 @@ Assert templates - - - - - - - - - /* begin assertEquals */ - struct dom_string *match; - - err = dom_string_create_from_const_ptr( - - - , (uint8_t *) , - SLEN(), &match); - assert(err == DOM_NO_ERR); - - assert( - - - dom_string_icmp - - - - <assertEquals ignoreCase='auto'> not supported - - - dom_string_cmp - - - (, match) == 0); - - - - - assert( == ); - - - Warning in assertEquals template: don't know how to compare variable type '' - - - - /* end assertEquals */ - - - - - - - - - - - is_struct - - struct - - - - - - - * - - - - - - - - - - dom_document - - - dom_document_type - - - dom_string - - - dom_element - - - dom_node - - - dom_node_type - - - - - - - - - - - - - node_name - - - node_value - - - node_type - - - - - - + - - - + + + + + + + + + - - - - _ - - create_element + + + + + struct + + * + + + - - + + * -- cgit v1.2.3