summaryrefslogtreecommitdiff
path: root/tests/cxx/tree/order
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cxx/tree/order')
-rw-r--r--tests/cxx/tree/order/driver.cxx64
-rw-r--r--tests/cxx/tree/order/makefile93
-rw-r--r--tests/cxx/tree/order/output92
-rw-r--r--tests/cxx/tree/order/test.xml71
-rw-r--r--tests/cxx/tree/order/test.xsd130
5 files changed, 0 insertions, 450 deletions
diff --git a/tests/cxx/tree/order/driver.cxx b/tests/cxx/tree/order/driver.cxx
deleted file mode 100644
index 839191a..0000000
--- a/tests/cxx/tree/order/driver.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-// file : tests/cxx/tree/order/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test ordered type support.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-using namespace xercesc;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- XMLPlatformUtils::Initialize ();
-
- try
- {
- XSD_AUTO_PTR<root> r (root_ (argv[1], xml_schema::flags::dont_initialize));
-
- root c (*r);
- assert (c == *r);
-
- for (root::t1_const_iterator j (r->t1 ().begin ());
- j != r->t1 ().end (); ++j)
- {
- const t1_derived& d (*j);
-
- for (t1_derived::content_order_const_iterator i (
- d.content_order ().begin ()); i != d.content_order ().end (); ++i)
- {
- cout << i->id << ' ' << i->index << endl;
- }
- }
-
- xml_schema::namespace_infomap map;
-
- map["t"].name = "test";
- map["t1"].name = "test1";
-
- root_ (cout, *r, map, "UTF-8", xml_schema::flags::dont_initialize);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-
- XMLPlatformUtils::Terminate ();
-}
diff --git a/tests/cxx/tree/order/makefile b/tests/cxx/tree/order/makefile
deleted file mode 100644
index 251b1f3..0000000
--- a/tests/cxx/tree/order/makefile
+++ /dev/null
@@ -1,93 +0,0 @@
-# file : tests/cxx/tree/order/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --generate-wildcard \
---generate-comparison \
---ordered-type t1_base --ordered-type t1_derived \
---ordered-type t2_base --ordered-type t2_derived \
---ordered-type t3_type \
---ordered-type t4_base --ordered-type t4_derived \
---ordered-type t5_base --ordered-type t5_derived \
---ordered-type t6_base --ordered-type t6_derived \
---ordered-type t7_type
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/order/output b/tests/cxx/tree/order/output
deleted file mode 100644
index 73442fe..0000000
--- a/tests/cxx/tree/order/output
+++ /dev/null
@@ -1,92 +0,0 @@
-2 0
-1 0
-1 1
-2 1
-3 0
-4 0
-3 1
-4 1
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-<t:root xmlns:t="test" xmlns:t1="test1">
- <t1>
- <b>b1</b>
- <a>a1</a>
- <a>a2</a>
- <b>b2</b>
- <c>c1</c>
- <d>d1</d>
- <t1:e>e1</t1:e>
- <d>d2</d>
- <t1:f>f1</t1:f>
- </t1>
- <t2>
- <b>b1</b>
- <a>a1</a>
- <b>b2</b>
- <a>a2</a>
- </t2>
- <t3>
- <a>a1</a>
- <b>b1</b>
- <c>c1</c>
- <c>c2</c>
- </t3>
- <t3>
- <a>a1</a>
- <c>c1</c>
- </t3>
- <t4>
- t1
-
- <b>b1</b>
- t2
-
- <a>a1</a>
- t3
-
- <b>b2</b>
- t4
-
- <a>a2</a>
- t5
-
- <t1:d>d1</t1:d>
- t6
-
- <c>c1</c>
- t7
-
- </t4>
- <t5a>
- t5a
- </t5a>
- <t5b>
- t1
-
- <b>b1</b>
- t2
-
- <a>a1</a>
- t3
-
- <a>a2</a>
- t4
-
- <b>b2</b>
- t5
-
- </t5b>
- <t6>
- t6
- </t6>
- <t7>
- t1
-
- <t1:a>a1</t1:a>
- t2
-
- <t1:b>b1</t1:b>
- t3
-
- </t7>
-</t:root>
diff --git a/tests/cxx/tree/order/test.xml b/tests/cxx/tree/order/test.xml
deleted file mode 100644
index cd82936..0000000
--- a/tests/cxx/tree/order/test.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:t1="test1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
- <t1>
- <b>b1</b>
- <a>a1</a>
- <a>a2</a>
- <b>b2</b>
- <c>c1</c>
- <d>d1</d>
- <t1:e>e1</t1:e>
- <d>d2</d>
- <t1:f>f1</t1:f>
- </t1>
- <t2>
- <b>b1</b>
- <a>a1</a>
- <b>b2</b>
- <a>a2</a>
- </t2>
- <t3>
- <a>a1</a>
- <b>b1</b>
- <c>c1</c>
- <c>c2</c>
- </t3>
- <t3>
- <a>a1</a>
- <c>c1</c>
- </t3>
- <t4>
- t1
- <b>b1</b>
- t2
- <a>a1</a>
- t3
- <b>b2</b>
- t4
- <a>a2</a>
- t5
- <t1:d>d1</t1:d>
- t6
- <c>c1</c>
- t7
- </t4>
- <t5a>
- t5a
- </t5a>
- <t5b>
- t1
- <b>b1</b>
- t2
- <a>a1</a>
- t3
- <a>a2</a>
- t4
- <b>b2</b>
- t5
- </t5b>
- <t6>
- t6
- </t6>
- <t7>
- t1
- <t1:a>a1</t1:a>
- t2
- <t1:b>b1</t1:b>
- t3
- </t7>
-</t:root>
diff --git a/tests/cxx/tree/order/test.xsd b/tests/cxx/tree/order/test.xsd
deleted file mode 100644
index c30c027..0000000
--- a/tests/cxx/tree/order/test.xsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">
-
- <!-- Test 1: general, with non-ordered intermediate. -->
-
- <complexType name="t1_base">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="a" type="string"/>
- <element name="b" type="string"/>
- </choice>
- </complexType>
-
- <complexType name="t1_interm">
- <complexContent>
- <extension base="t:t1_base">
- <sequence>
- <element name="c" type="string" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="t1_derived">
- <complexContent>
- <extension base="t:t1_interm">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="d" type="string"/>
- <any namespace="##other" processContents="lax"/>
- </choice>
- </extension>
- </complexContent>
- </complexType>
-
- <!-- Test 2: empty base. -->
-
- <complexType name="t2_base"/>
-
- <complexType name="t2_derived">
- <complexContent>
- <extension base="t:t2_base">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="a" type="string"/>
- <element name="b" type="string"/>
- </choice>
- </extension>
- </complexContent>
- </complexType>
-
- <!-- Test 3: element cardinalities. -->
-
- <complexType name="t3_type">
- <sequence>
- <element name="a" type="string"/>
- <element name="b" type="string" minOccurs="0"/>
- <element name="c" type="string" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
-
- <!-- Test 4: mixed content, general. -->
-
- <complexType name="t4_base" mixed="true">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="a" type="string"/>
- <element name="b" type="string"/>
- </choice>
- </complexType>
-
- <complexType name="t4_derived">
- <complexContent mixed="true">
- <extension base="t:t4_base">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="c" type="string"/>
- <any namespace="##other" processContents="lax"/>
- </choice>
- </extension>
- </complexContent>
- </complexType>
-
- <!-- Test 5: mixed content, empty base. -->
-
- <complexType name="t5_base" mixed="true"/>
-
- <complexType name="t5_derived">
- <complexContent mixed="true">
- <extension base="t:t5_base">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="a" type="string"/>
- <element name="b" type="string"/>
- </choice>
- </extension>
- </complexContent>
- </complexType>
-
- <!-- Test 6: mixed content, empty base and derived. -->
-
- <complexType name="t6_base" mixed="true"/>
-
- <complexType name="t6_derived">
- <complexContent mixed="true">
- <extension base="t:t6_base"/>
- </complexContent>
- </complexType>
-
- <!-- Test 7: mixed content wildcard only. -->
-
- <complexType name="t7_type" mixed="true">
- <sequence>
- <any namespace="##other" processContents="lax" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <!-- Root -->
-
- <complexType name="root">
- <sequence>
- <element name="t1" type="t:t1_derived" maxOccurs="unbounded"/>
- <element name="t2" type="t:t2_derived" maxOccurs="unbounded"/>
- <element name="t3" type="t:t3_type" maxOccurs="unbounded"/>
- <element name="t4" type="t:t4_derived" maxOccurs="unbounded"/>
- <element name="t5a" type="t:t5_base" maxOccurs="unbounded"/>
- <element name="t5b" type="t:t5_derived" maxOccurs="unbounded"/>
- <element name="t6" type="t:t6_derived" maxOccurs="unbounded"/>
- <element name="t7" type="t:t7_type" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <element name="root" type="t:root"/>
-
-</schema>