aboutsummaryrefslogtreecommitdiff
path: root/tests/cxx/hybrid/binary/xdr
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-04-02 12:22:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-04-02 12:22:38 +0200
commit8336dd4c16d4885989a6d8f0c83a4b401f5cb63b (patch)
tree26ca613e7f3a3fe9fb75bf5bb3b65503661e0ebf /tests/cxx/hybrid/binary/xdr
parente4c22d3686da0e973e21eae0561c1169c0eeff36 (diff)
Add support for attributes with default and fixed values.
tests/cxx/hybrid/default: new test tests/cxx/hybrid/binary: update to test default and fixed values
Diffstat (limited to 'tests/cxx/hybrid/binary/xdr')
-rw-r--r--tests/cxx/hybrid/binary/xdr/output.xml2
-rw-r--r--tests/cxx/hybrid/binary/xdr/test.xml4
-rw-r--r--tests/cxx/hybrid/binary/xdr/test.xsd12
3 files changed, 15 insertions, 3 deletions
diff --git a/tests/cxx/hybrid/binary/xdr/output.xml b/tests/cxx/hybrid/binary/xdr/output.xml
index a484661..f36f755 100644
--- a/tests/cxx/hybrid/binary/xdr/output.xml
+++ b/tests/cxx/hybrid/binary/xdr/output.xml
@@ -1,2 +1,2 @@
-<t:root xmlns:t="test"><list>1 2 3</list><union>abc</union><enumeration>left</enumeration><complex x="1"><a>aaa</a></complex><complex x="1" y="2"><a>aaa</a><b>bbb</b><c>c</c><c>cc</c><c>ccc</c></complex><choice></choice><choice><a>123</a></choice><choice><b>ab</b><b>cd</b><b>ef</b></choice><choice><c>12.34</c><d>false</d></choice><byte>65</byte><unsigned_byte>66</unsigned_byte><short>-222</short><unsigned_short>57005</unsigned_short><int>-57005</int><unsigned_int>3735928559</unsigned_int><long>-2147483648</long><unsigned_long>2147483647</unsigned_long><integer>-2147483648</integer><non_positive_integer>-2147483648</non_positive_integer><non_negative_integer>2147483647</non_negative_integer><positive_integer>2147483647</positive_integer><negative_integer>-2147483648</negative_integer><boolean>true</boolean><float>1234.12</float><double>12345678.1234568</double><decimal>1234567812345678</decimal><string>string</string><normalized_string>normalized string</normalized_string><token>one two three</token><name>name</name><name_token>name-token</name_token><name_tokens>name tokens</name_tokens><ncname>ncname</ncname><language>en-us</language><qname>xsi:schemaLocation</qname><id>elements1</id><id>elements2</id><id_ref>elements1</id_ref><id_refs>elements1 elements2</id_refs><any_uri>http://www.codesynthesis.com</any_uri><base64_binary>YmFzZTY0IGJpbmFyeQ==
+<t:root xmlns:t="test"><list>1 2 3</list><union>abc</union><enumeration>left</enumeration><complex df1="123" df2="456" dv1="aaa bbb ccc" dv2="mmm nnn" ff1="123" ff2="123" fv1="aaa bbb ccc" fv2="aaa bbb ccc" x="1"><a>aaa</a></complex><complex df1="123" df2="123" dv1="aaa bbb ccc" dv2="aaa bbb ccc" ff1="123" ff2="123" fv1="aaa bbb ccc" fv2="aaa bbb ccc" x="1" y="2"><a>aaa</a><b>bbb</b><c>c</c><c>cc</c><c>ccc</c></complex><choice></choice><choice><a>123</a></choice><choice><b>ab</b><b>cd</b><b>ef</b></choice><choice><c>12.34</c><d>false</d></choice><byte>65</byte><unsigned_byte>66</unsigned_byte><short>-222</short><unsigned_short>57005</unsigned_short><int>-57005</int><unsigned_int>3735928559</unsigned_int><long>-2147483648</long><unsigned_long>2147483647</unsigned_long><integer>-2147483648</integer><non_positive_integer>-2147483648</non_positive_integer><non_negative_integer>2147483647</non_negative_integer><positive_integer>2147483647</positive_integer><negative_integer>-2147483648</negative_integer><boolean>true</boolean><float>1234.12</float><double>12345678.1234568</double><decimal>1234567812345678</decimal><string>string</string><normalized_string>normalized string</normalized_string><token>one two three</token><name>name</name><name_token>name-token</name_token><name_tokens>name tokens</name_tokens><ncname>ncname</ncname><language>en-us</language><qname>xsi:schemaLocation</qname><id>elements1</id><id>elements2</id><id_ref>elements1</id_ref><id_refs>elements1 elements2</id_refs><any_uri>http://www.codesynthesis.com</any_uri><base64_binary>YmFzZTY0IGJpbmFyeQ==
</base64_binary><hex_binary>6865782052696E617279</hex_binary><date>2001-10-26+02:00</date><date_time>2001-10-26T21:32:52+02:00</date_time><duration>P1Y2M3DT5H20M30S</duration><day>---01+02:00</day><month>--11+02:00</month><month_day>--02-11+02:00</month_day><year>2001+02:00</year><year_month>2001-11+02:00</year_month><time>21:32:52+02:00</time></t:root> \ No newline at end of file
diff --git a/tests/cxx/hybrid/binary/xdr/test.xml b/tests/cxx/hybrid/binary/xdr/test.xml
index acd75d2..1218c37 100644
--- a/tests/cxx/hybrid/binary/xdr/test.xml
+++ b/tests/cxx/hybrid/binary/xdr/test.xml
@@ -6,10 +6,10 @@
<enumeration>left</enumeration>
- <complex x="1">
+ <complex x="1" df2="456" ff2="123" dv2="mmm nnn" fv2="aaa bbb ccc">
<a>aaa</a>
</complex>
- <complex x="1" y="2">
+ <complex x="1" y="2" ff2="123" fv2="aaa bbb ccc">
<a>aaa</a>
<b>bbb</b>
<c>c</c>
diff --git a/tests/cxx/hybrid/binary/xdr/test.xsd b/tests/cxx/hybrid/binary/xdr/test.xsd
index 7a92c7e..5a2ea34 100644
--- a/tests/cxx/hybrid/binary/xdr/test.xsd
+++ b/tests/cxx/hybrid/binary/xdr/test.xsd
@@ -35,6 +35,18 @@
<element name="c" type="string" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="y" type="int"/>
+
+ <!-- test default/fixed values -->
+
+ <attribute name="df1" type="int" default="123"/>
+ <attribute name="df2" type="int" default="123"/>
+ <attribute name="ff1" type="int" fixed="123"/>
+ <attribute name="ff2" type="int" fixed="123" use="required"/>
+
+ <attribute name="dv1" type="NMTOKENS" default="aaa bbb ccc"/>
+ <attribute name="dv2" type="NMTOKENS" default="aaa bbb ccc"/>
+ <attribute name="fv1" type="NMTOKENS" fixed="aaa bbb ccc"/>
+ <attribute name="fv2" type="NMTOKENS" fixed="aaa bbb ccc" use="required"/>
</extension>
</complexContent>
</complexType>