summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cxx/parser/built-in/driver.cxx6
-rw-r--r--tests/cxx/parser/built-in/makefile5
-rw-r--r--tests/cxx/parser/enumeration/makefile5
-rw-r--r--tests/cxx/parser/generated-impl/makefile5
-rw-r--r--tests/cxx/parser/list/makefile5
-rw-r--r--tests/cxx/parser/name-clash/inheritance/makefile5
-rw-r--r--tests/cxx/parser/polymorphism/recursive/makefile5
-rw-r--r--tests/cxx/parser/polymorphism/same-type/makefile5
-rw-r--r--tests/cxx/parser/recursive/makefile5
-rw-r--r--tests/cxx/parser/test-template/makefile5
-rw-r--r--tests/cxx/parser/union/makefile5
-rw-r--r--tests/cxx/parser/validation/all/makefile5
-rw-r--r--tests/cxx/parser/validation/any/makefile5
-rw-r--r--tests/cxx/parser/validation/attribute/makefile5
-rw-r--r--tests/cxx/parser/validation/built-in/any-type/makefile5
-rw-r--r--tests/cxx/parser/validation/built-in/binary/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/boolean/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/byte/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/date-time/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/float/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/int/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/integer/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/long/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/qname/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/short/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/string/makefile7
-rw-r--r--tests/cxx/parser/validation/built-in/uri/makefile7
-rw-r--r--tests/cxx/parser/validation/choice/makefile5
-rw-r--r--tests/cxx/parser/validation/restriction/makefile5
-rw-r--r--tests/cxx/parser/validation/sequence/makefile5
-rw-r--r--tests/cxx/tree/binary/cdr/driver.cxx6
-rw-r--r--tests/cxx/tree/binary/cdr/makefile5
-rw-r--r--tests/cxx/tree/binary/polymorphic/driver.cxx6
-rw-r--r--tests/cxx/tree/binary/polymorphic/makefile5
-rw-r--r--tests/cxx/tree/binary/xdr/driver.cxx6
-rw-r--r--tests/cxx/tree/binary/xdr/makefile5
-rw-r--r--tests/cxx/tree/built-in/driver.cxx19
-rw-r--r--tests/cxx/tree/built-in/makefile5
-rw-r--r--tests/cxx/tree/chameleon/driver.cxx4
-rw-r--r--tests/cxx/tree/chameleon/makefile5
-rw-r--r--tests/cxx/tree/comparison/driver.cxx4
-rw-r--r--tests/cxx/tree/comparison/makefile5
-rw-r--r--tests/cxx/tree/compilation/driver.cxx1
-rw-r--r--tests/cxx/tree/compilation/makefile5
-rw-r--r--tests/cxx/tree/complex/ctor/driver.cxx50
-rw-r--r--tests/cxx/tree/complex/ctor/makefile6
-rw-r--r--tests/cxx/tree/containment/driver.cxx45
-rw-r--r--tests/cxx/tree/containment/makefile5
-rw-r--r--tests/cxx/tree/default/general/driver.cxx4
-rw-r--r--tests/cxx/tree/default/general/makefile5
-rw-r--r--tests/cxx/tree/default/omit/driver.cxx4
-rw-r--r--tests/cxx/tree/default/omit/makefile5
-rw-r--r--tests/cxx/tree/detach/driver.cxx23
-rw-r--r--tests/cxx/tree/detach/makefile5
-rw-r--r--tests/cxx/tree/dom-association/dom-parse.cxx97
-rw-r--r--tests/cxx/tree/dom-association/dom-parse.hxx25
-rw-r--r--tests/cxx/tree/dom-association/driver.cxx73
-rw-r--r--tests/cxx/tree/dom-association/makefile93
-rw-r--r--tests/cxx/tree/dom-association/output0
-rw-r--r--tests/cxx/tree/dom-association/test.xml7
-rw-r--r--tests/cxx/tree/dom-association/test.xsd12
-rw-r--r--tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx4
-rw-r--r--tests/cxx/tree/encoding/char/iso-8859-1/makefile5
-rw-r--r--tests/cxx/tree/encoding/char/lcp/driver.cxx4
-rw-r--r--tests/cxx/tree/encoding/char/lcp/makefile5
-rw-r--r--tests/cxx/tree/encoding/char/utf-8/driver.cxx4
-rw-r--r--tests/cxx/tree/encoding/char/utf-8/makefile5
-rw-r--r--tests/cxx/tree/encoding/wchar/driver.cxx4
-rw-r--r--tests/cxx/tree/encoding/wchar/makefile5
-rw-r--r--tests/cxx/tree/enumeration/ctor/makefile5
-rw-r--r--tests/cxx/tree/enumeration/inheritance/driver.cxx4
-rw-r--r--tests/cxx/tree/enumeration/inheritance/makefile5
-rw-r--r--tests/cxx/tree/float/driver.cxx4
-rw-r--r--tests/cxx/tree/float/makefile5
-rw-r--r--tests/cxx/tree/list/ctor/makefile5
-rw-r--r--tests/cxx/tree/makefile41
-rw-r--r--tests/cxx/tree/name-clash/inheritance/driver.cxx4
-rw-r--r--tests/cxx/tree/name-clash/inheritance/makefile5
-rw-r--r--tests/cxx/tree/naming/camel/driver.cxx1
-rw-r--r--tests/cxx/tree/naming/camel/makefile5
-rw-r--r--tests/cxx/tree/naming/java/driver.cxx1
-rw-r--r--tests/cxx/tree/naming/java/makefile5
-rw-r--r--tests/cxx/tree/naming/knr/driver.cxx1
-rw-r--r--tests/cxx/tree/naming/knr/makefile5
-rw-r--r--tests/cxx/tree/polymorphism/comparison/driver.cxx4
-rw-r--r--tests/cxx/tree/polymorphism/comparison/makefile5
-rw-r--r--tests/cxx/tree/polymorphism/ostream/driver.cxx4
-rw-r--r--tests/cxx/tree/polymorphism/ostream/makefile5
-rw-r--r--tests/cxx/tree/polymorphism/same-type/driver.cxx4
-rw-r--r--tests/cxx/tree/polymorphism/same-type/makefile5
-rw-r--r--tests/cxx/tree/prefix/driver.cxx4
-rw-r--r--tests/cxx/tree/prefix/makefile5
-rw-r--r--tests/cxx/tree/test-template/driver.cxx4
-rw-r--r--tests/cxx/tree/test-template/makefile5
-rw-r--r--tests/cxx/tree/types-only/driver.cxx1
-rw-r--r--tests/cxx/tree/types-only/makefile5
-rw-r--r--tests/cxx/tree/union/ctor/makefile5
-rw-r--r--tests/cxx/tree/wildcard/driver.cxx10
-rw-r--r--tests/cxx/tree/wildcard/makefile5
99 files changed, 789 insertions, 129 deletions
diff --git a/tests/cxx/parser/built-in/driver.cxx b/tests/cxx/parser/built-in/driver.cxx
index b095af0..f9497f6 100644
--- a/tests/cxx/parser/built-in/driver.cxx
+++ b/tests/cxx/parser/built-in/driver.cxx
@@ -24,7 +24,7 @@ struct any_type_pimpl: xml_schema::any_type_pimpl
}
virtual void
- _start_any_element (ro_string const&,
+ _start_any_element (ro_string const&,
ro_string const& n,
ro_string const*)
{
@@ -278,14 +278,14 @@ struct type_pimpl: type_pskel
}
virtual void
- base64_binary (std::auto_ptr<xml_schema::buffer> v)
+ base64_binary (XSD_AUTO_PTR<xml_schema::buffer> v)
{
std::string tmp (v->data (), v->size ());
cout << "'" << tmp << "'" << endl;
}
virtual void
- hex_binary (std::auto_ptr<xml_schema::buffer> v)
+ hex_binary (XSD_AUTO_PTR<xml_schema::buffer> v)
{
std::string tmp (v->data (), v->size ());
cout << "'" << tmp << "'" << endl;
diff --git a/tests/cxx/parser/built-in/makefile b/tests/cxx/parser/built-in/makefile
index 821d519..fe73631 100644
--- a/tests/cxx/parser/built-in/makefile
+++ b/tests/cxx/parser/built-in/makefile
@@ -71,7 +71,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/enumeration/makefile b/tests/cxx/parser/enumeration/makefile
index a60bb9a..af3ae5f 100644
--- a/tests/cxx/parser/enumeration/makefile
+++ b/tests/cxx/parser/enumeration/makefile
@@ -72,7 +72,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/generated-impl/makefile b/tests/cxx/parser/generated-impl/makefile
index e5714d7..8cb3998 100644
--- a/tests/cxx/parser/generated-impl/makefile
+++ b/tests/cxx/parser/generated-impl/makefile
@@ -82,7 +82,12 @@ $(call include,$(bld_root)/cxx/cxx-o.make)
$(call include,$(bld_root)/cxx/cxx-d.make)
xsd_parser_impl_suffix := -pimpl
+
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifdef cxx_standard
+$(gen): xsd_options += --std $(cxx_standard)
$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/list/makefile b/tests/cxx/parser/list/makefile
index db93e57..535f443 100644
--- a/tests/cxx/parser/list/makefile
+++ b/tests/cxx/parser/list/makefile
@@ -71,7 +71,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/name-clash/inheritance/makefile b/tests/cxx/parser/name-clash/inheritance/makefile
index 579c8e5..e574fc7 100644
--- a/tests/cxx/parser/name-clash/inheritance/makefile
+++ b/tests/cxx/parser/name-clash/inheritance/makefile
@@ -72,7 +72,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/polymorphism/recursive/makefile b/tests/cxx/parser/polymorphism/recursive/makefile
index 4baf0e7..a6def7d 100644
--- a/tests/cxx/parser/polymorphism/recursive/makefile
+++ b/tests/cxx/parser/polymorphism/recursive/makefile
@@ -72,7 +72,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/polymorphism/same-type/makefile b/tests/cxx/parser/polymorphism/same-type/makefile
index 3930e70..97379dd 100644
--- a/tests/cxx/parser/polymorphism/same-type/makefile
+++ b/tests/cxx/parser/polymorphism/same-type/makefile
@@ -72,7 +72,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/recursive/makefile b/tests/cxx/parser/recursive/makefile
index 44ef977..292ec38 100644
--- a/tests/cxx/parser/recursive/makefile
+++ b/tests/cxx/parser/recursive/makefile
@@ -72,7 +72,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/test-template/makefile b/tests/cxx/parser/test-template/makefile
index 2ed7d5c..09d8fb5 100644
--- a/tests/cxx/parser/test-template/makefile
+++ b/tests/cxx/parser/test-template/makefile
@@ -71,7 +71,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/union/makefile b/tests/cxx/parser/union/makefile
index 1878461..0215274 100644
--- a/tests/cxx/parser/union/makefile
+++ b/tests/cxx/parser/union/makefile
@@ -71,7 +71,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/validation/all/makefile b/tests/cxx/parser/validation/all/makefile
index ec737aa..9492596 100644
--- a/tests/cxx/parser/validation/all/makefile
+++ b/tests/cxx/parser/validation/all/makefile
@@ -81,7 +81,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/validation/any/makefile b/tests/cxx/parser/validation/any/makefile
index ba09d32..5255faa 100644
--- a/tests/cxx/parser/validation/any/makefile
+++ b/tests/cxx/parser/validation/any/makefile
@@ -81,7 +81,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/validation/attribute/makefile b/tests/cxx/parser/validation/attribute/makefile
index b1c0589..056f82a 100644
--- a/tests/cxx/parser/validation/attribute/makefile
+++ b/tests/cxx/parser/validation/attribute/makefile
@@ -81,7 +81,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/validation/built-in/any-type/makefile b/tests/cxx/parser/validation/built-in/any-type/makefile
index e09eea6..90c7ddd 100644
--- a/tests/cxx/parser/validation/built-in/any-type/makefile
+++ b/tests/cxx/parser/validation/built-in/any-type/makefile
@@ -81,7 +81,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/validation/built-in/binary/makefile b/tests/cxx/parser/validation/built-in/binary/makefile
index 72fe813..cd3d283 100644
--- a/tests/cxx/parser/validation/built-in/binary/makefile
+++ b/tests/cxx/parser/validation/built-in/binary/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/boolean/makefile b/tests/cxx/parser/validation/built-in/boolean/makefile
index c9104af..a7b13c2 100644
--- a/tests/cxx/parser/validation/built-in/boolean/makefile
+++ b/tests/cxx/parser/validation/built-in/boolean/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/byte/makefile b/tests/cxx/parser/validation/built-in/byte/makefile
index 6d11d98..0c7c0d9 100644
--- a/tests/cxx/parser/validation/built-in/byte/makefile
+++ b/tests/cxx/parser/validation/built-in/byte/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/date-time/makefile b/tests/cxx/parser/validation/built-in/date-time/makefile
index 3feb7ab..7028315 100644
--- a/tests/cxx/parser/validation/built-in/date-time/makefile
+++ b/tests/cxx/parser/validation/built-in/date-time/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/float/makefile b/tests/cxx/parser/validation/built-in/float/makefile
index 12ddcd4..224b101 100644
--- a/tests/cxx/parser/validation/built-in/float/makefile
+++ b/tests/cxx/parser/validation/built-in/float/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/int/makefile b/tests/cxx/parser/validation/built-in/int/makefile
index 2f690ea..feb5f5a 100644
--- a/tests/cxx/parser/validation/built-in/int/makefile
+++ b/tests/cxx/parser/validation/built-in/int/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/integer/makefile b/tests/cxx/parser/validation/built-in/integer/makefile
index caff310..ed28cbf 100644
--- a/tests/cxx/parser/validation/built-in/integer/makefile
+++ b/tests/cxx/parser/validation/built-in/integer/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/long/makefile b/tests/cxx/parser/validation/built-in/long/makefile
index 9a49936..e71fa57 100644
--- a/tests/cxx/parser/validation/built-in/long/makefile
+++ b/tests/cxx/parser/validation/built-in/long/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/qname/makefile b/tests/cxx/parser/validation/built-in/qname/makefile
index 39f06ef..27ccf3e 100644
--- a/tests/cxx/parser/validation/built-in/qname/makefile
+++ b/tests/cxx/parser/validation/built-in/qname/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/short/makefile b/tests/cxx/parser/validation/built-in/short/makefile
index 9e252d1..7d79212 100644
--- a/tests/cxx/parser/validation/built-in/short/makefile
+++ b/tests/cxx/parser/validation/built-in/short/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/string/makefile b/tests/cxx/parser/validation/built-in/string/makefile
index 29d0afc..16cbcf6 100644
--- a/tests/cxx/parser/validation/built-in/string/makefile
+++ b/tests/cxx/parser/validation/built-in/string/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/built-in/uri/makefile b/tests/cxx/parser/validation/built-in/uri/makefile
index abf49a8..a158a84 100644
--- a/tests/cxx/parser/validation/built-in/uri/makefile
+++ b/tests/cxx/parser/validation/built-in/uri/makefile
@@ -28,6 +28,13 @@ $(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)
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
diff --git a/tests/cxx/parser/validation/choice/makefile b/tests/cxx/parser/validation/choice/makefile
index 2ce866f..031aee2 100644
--- a/tests/cxx/parser/validation/choice/makefile
+++ b/tests/cxx/parser/validation/choice/makefile
@@ -81,7 +81,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/validation/restriction/makefile b/tests/cxx/parser/validation/restriction/makefile
index df31dac..2bb7969 100644
--- a/tests/cxx/parser/validation/restriction/makefile
+++ b/tests/cxx/parser/validation/restriction/makefile
@@ -81,7 +81,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/parser/validation/sequence/makefile b/tests/cxx/parser/validation/sequence/makefile
index 93dd57c..99ef63f 100644
--- a/tests/cxx/parser/validation/sequence/makefile
+++ b/tests/cxx/parser/validation/sequence/makefile
@@ -81,7 +81,12 @@ endif
$(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/parser/xsd-cxx.make)
+endif
# Dependencies.
diff --git a/tests/cxx/tree/binary/cdr/driver.cxx b/tests/cxx/tree/binary/cdr/driver.cxx
index 012c2cf..9980579 100644
--- a/tests/cxx/tree/binary/cdr/driver.cxx
+++ b/tests/cxx/tree/binary/cdr/driver.cxx
@@ -6,7 +6,7 @@
// Test non-polymorphic binary serialization to ACE CDR.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <cassert>
#include <iostream>
@@ -26,7 +26,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
// Save to a CDR stream.
//
@@ -38,7 +38,7 @@ main (int argc, char* argv[])
//
ACE_InputCDR ace_icdr (ace_ocdr);
xml_schema::istream<ACE_InputCDR> icdr (ace_icdr);
- auto_ptr<type> c (new type (icdr));
+ XSD_AUTO_PTR<type> c (new type (icdr));
// Compare the two.
//
diff --git a/tests/cxx/tree/binary/cdr/makefile b/tests/cxx/tree/binary/cdr/makefile
index 0fce1e9..c77a026 100644
--- a/tests/cxx/tree/binary/cdr/makefile
+++ b/tests/cxx/tree/binary/cdr/makefile
@@ -78,7 +78,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/binary/polymorphic/driver.cxx b/tests/cxx/tree/binary/polymorphic/driver.cxx
index 8aff63c..5c82b17 100644
--- a/tests/cxx/tree/binary/polymorphic/driver.cxx
+++ b/tests/cxx/tree/binary/polymorphic/driver.cxx
@@ -6,7 +6,7 @@
// Test polymorphic binary serialization.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <cassert>
#include <iostream>
#include <typeinfo>
@@ -29,7 +29,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
// Save to a CDR stream.
//
@@ -54,7 +54,7 @@ main (int argc, char* argv[])
//
ACE_InputCDR ace_icdr (ace_ocdr);
xml_schema::istream<ACE_InputCDR> icdr (ace_icdr);
- auto_ptr<type> c (new type (icdr));
+ XSD_AUTO_PTR<type> c (new type (icdr));
// Compare the two.
//
diff --git a/tests/cxx/tree/binary/polymorphic/makefile b/tests/cxx/tree/binary/polymorphic/makefile
index e3abe50..dc01b6a 100644
--- a/tests/cxx/tree/binary/polymorphic/makefile
+++ b/tests/cxx/tree/binary/polymorphic/makefile
@@ -78,7 +78,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/binary/xdr/driver.cxx b/tests/cxx/tree/binary/xdr/driver.cxx
index 9c1e3c2..0448240 100644
--- a/tests/cxx/tree/binary/xdr/driver.cxx
+++ b/tests/cxx/tree/binary/xdr/driver.cxx
@@ -6,7 +6,7 @@
// Test non-polymorphic binary serialization to XDR.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <cstring> // std::memcpy
#include <cassert>
#include <iostream>
@@ -59,7 +59,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
// Save to an XDR stream.
//
@@ -81,7 +81,7 @@ main (int argc, char* argv[])
xdr.x_op = XDR_DECODE;
xdrrec_skiprecord (&xdr);
xsd::cxx::tree::istream<XDR> ixdr (xdr);
- auto_ptr<type> c (new type (ixdr));
+ XSD_AUTO_PTR<type> c (new type (ixdr));
xdr_destroy (&xdr);
// Compare the two.
diff --git a/tests/cxx/tree/binary/xdr/makefile b/tests/cxx/tree/binary/xdr/makefile
index 476690b..f846b66 100644
--- a/tests/cxx/tree/binary/xdr/makefile
+++ b/tests/cxx/tree/binary/xdr/makefile
@@ -73,7 +73,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/built-in/driver.cxx b/tests/cxx/tree/built-in/driver.cxx
index fee634a..f1d02a5 100644
--- a/tests/cxx/tree/built-in/driver.cxx
+++ b/tests/cxx/tree/built-in/driver.cxx
@@ -6,7 +6,7 @@
// Test built-in type mapping.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <sstream>
#include <iostream>
@@ -15,7 +15,6 @@
using std::cerr;
using std::endl;
-using std::auto_ptr;
int
main (int argc, char* argv[])
@@ -26,12 +25,13 @@ main (int argc, char* argv[])
return 1;
}
- auto_ptr<xmlns::test::Elements> elements (xmlns::test::elements (argv[1]));
+ XSD_AUTO_PTR<xmlns::test::Elements> elements (
+ xmlns::test::elements (argv[1]));
- auto_ptr<xmlns::test::Attributes> attributes (
+ XSD_AUTO_PTR<xmlns::test::Attributes> attributes (
xmlns::test::attributes (argv[2]));
- auto_ptr<xmlns::test::Inherited> inherited (
+ XSD_AUTO_PTR<xmlns::test::Inherited> inherited (
xmlns::test::inherited (argv[3]));
cerr << "elements: " << *elements << endl
@@ -53,13 +53,14 @@ main (int argc, char* argv[])
xmlns::test::elements (ostr, *elements, map);
std::istringstream istr (ostr.str ());
- auto_ptr<xmlns::test::Elements> elements1 (xmlns::test::elements (istr));
+ XSD_AUTO_PTR<xmlns::test::Elements> elements1 (
+ xmlns::test::elements (istr));
std::ostringstream ostr1;
xmlns::test::elements (ostr1, *elements1, map);
if (ostr.str () != ostr1.str ())
- return 1;
+ return 1;
}
{
@@ -67,7 +68,7 @@ main (int argc, char* argv[])
xmlns::test::attributes (ostr, *attributes, map);
std::istringstream istr (ostr.str ());
- auto_ptr<xmlns::test::Attributes> attributes1 (
+ XSD_AUTO_PTR<xmlns::test::Attributes> attributes1 (
xmlns::test::attributes (istr));
std::ostringstream ostr1;
@@ -82,7 +83,7 @@ main (int argc, char* argv[])
xmlns::test::inherited (ostr, *inherited, map);
std::istringstream istr (ostr.str ());
- auto_ptr<xmlns::test::Inherited> inherited1 (
+ XSD_AUTO_PTR<xmlns::test::Inherited> inherited1 (
xmlns::test::inherited (istr));
std::ostringstream ostr1;
diff --git a/tests/cxx/tree/built-in/makefile b/tests/cxx/tree/built-in/makefile
index ad8aba1..b94930f 100644
--- a/tests/cxx/tree/built-in/makefile
+++ b/tests/cxx/tree/built-in/makefile
@@ -89,7 +89,12 @@ endif
$(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.
#
diff --git a/tests/cxx/tree/chameleon/driver.cxx b/tests/cxx/tree/chameleon/driver.cxx
index 1627144..8dc7bff 100644
--- a/tests/cxx/tree/chameleon/driver.cxx
+++ b/tests/cxx/tree/chameleon/driver.cxx
@@ -6,7 +6,7 @@
// Test chameleon inclusion.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "includer.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<root_t> r (root (argv[1]));
+ XSD_AUTO_PTR<root_t> r (root (argv[1]));
cout << *r << endl;
}
diff --git a/tests/cxx/tree/chameleon/makefile b/tests/cxx/tree/chameleon/makefile
index 77eab9b..6dc2f3f 100644
--- a/tests/cxx/tree/chameleon/makefile
+++ b/tests/cxx/tree/chameleon/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/comparison/driver.cxx b/tests/cxx/tree/comparison/driver.cxx
index f6480bb..41e91a9 100644
--- a/tests/cxx/tree/comparison/driver.cxx
+++ b/tests/cxx/tree/comparison/driver.cxx
@@ -6,7 +6,7 @@
// Test generated comparison operators.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
type::complex_sequence s (r->complex ());
diff --git a/tests/cxx/tree/comparison/makefile b/tests/cxx/tree/comparison/makefile
index 0ed2dd7..b88389c 100644
--- a/tests/cxx/tree/comparison/makefile
+++ b/tests/cxx/tree/comparison/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/compilation/driver.cxx b/tests/cxx/tree/compilation/driver.cxx
index 060bf2c..71e58bc 100644
--- a/tests/cxx/tree/compilation/driver.cxx
+++ b/tests/cxx/tree/compilation/driver.cxx
@@ -7,7 +7,6 @@
// all the types.
//
-#include <memory> // std::auto_ptr
#include <iostream>
#include "test.hxx"
diff --git a/tests/cxx/tree/compilation/makefile b/tests/cxx/tree/compilation/makefile
index 6c4ebd8..4d3161b 100644
--- a/tests/cxx/tree/compilation/makefile
+++ b/tests/cxx/tree/compilation/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/complex/ctor/driver.cxx b/tests/cxx/tree/complex/ctor/driver.cxx
index ea9695d..2adeec4 100644
--- a/tests/cxx/tree/complex/ctor/driver.cxx
+++ b/tests/cxx/tree/complex/ctor/driver.cxx
@@ -11,6 +11,13 @@
#include "test.hxx"
+#ifdef XSD_CXX11
+# include <utility> // std::move
+# define XSD_MOVE(x) std::move(x)
+#else
+# define XSD_MOVE(x) x
+#endif
+
using namespace std;
using namespace test;
@@ -64,12 +71,12 @@ main ()
//
e_base b1 (1, "foo", e_complex_type ("bar"));
- auto_ptr<e_complex_type> c2 (new e_complex_type ("bar"));
- e_base b2 (1, "foo", c2);
+ XSD_AUTO_PTR<e_complex_type> c2 (new e_complex_type ("bar"));
+ e_base b2 (1, "foo", XSD_MOVE (c2));
- auto_ptr<e_simple_type> s3 (new e_simple_type ("foo"));
- auto_ptr<e_complex_type> c3 (new e_complex_type ("bar"));
- e_base b3 (1, s3, c3);
+ XSD_AUTO_PTR<e_simple_type> s3 (new e_simple_type ("foo"));
+ XSD_AUTO_PTR<e_complex_type> c3 (new e_complex_type ("bar"));
+ e_base b3 (1, XSD_MOVE (s3), XSD_MOVE (c3));
assert (b1 == b2);
assert (b1 == b3);
@@ -79,15 +86,20 @@ main ()
e_derived d1 (1, "foo", e_complex_type ("bar"),
true, "baz", e_complex_type ("biz"));
- auto_ptr<e_complex_type> c2a (new e_complex_type ("bar"));
- auto_ptr<e_complex_type> c2b (new e_complex_type ("biz"));
- e_derived d2 (1, "foo", c2a, true, "baz", c2b);
-
- auto_ptr<e_simple_type> s3a (new e_simple_type ("foo"));
- auto_ptr<xml_schema::string> s3b (new xml_schema::string ("baz"));
- auto_ptr<e_complex_type> c3a (new e_complex_type ("bar"));
- auto_ptr<e_complex_type> c3b (new e_complex_type ("biz"));
- e_derived d3 (1, s3a, c3a, true, s3b, c3b);
+ XSD_AUTO_PTR<e_complex_type> c2a (new e_complex_type ("bar"));
+ XSD_AUTO_PTR<e_complex_type> c2b (new e_complex_type ("biz"));
+ e_derived d2 (1, "foo", XSD_MOVE (c2a), true, "baz", XSD_MOVE (c2b));
+
+ XSD_AUTO_PTR<e_simple_type> s3a (new e_simple_type ("foo"));
+ XSD_AUTO_PTR<xml_schema::string> s3b (new xml_schema::string ("baz"));
+ XSD_AUTO_PTR<e_complex_type> c3a (new e_complex_type ("bar"));
+ XSD_AUTO_PTR<e_complex_type> c3b (new e_complex_type ("biz"));
+ e_derived d3 (1,
+ XSD_MOVE (s3a),
+ XSD_MOVE (c3a),
+ true,
+ XSD_MOVE (s3b),
+ XSD_MOVE (c3b));
assert (d1 == d2);
assert (d1 == d3);
@@ -99,12 +111,12 @@ main ()
{
f_type f1 (xml_schema::type (), 1, "foo", f_complex_type ("bar"));
- auto_ptr<f_complex_type> c2 (new f_complex_type ("bar"));
- f_type f2 (1, "foo", c2);
+ XSD_AUTO_PTR<f_complex_type> c2 (new f_complex_type ("bar"));
+ f_type f2 (1, "foo", XSD_MOVE (c2));
- auto_ptr<f_simple_type> s3 (new f_simple_type ("foo"));
- auto_ptr<f_complex_type> c3 (new f_complex_type ("bar"));
- f_type f3 (1, s3, c3);
+ XSD_AUTO_PTR<f_simple_type> s3 (new f_simple_type ("foo"));
+ XSD_AUTO_PTR<f_complex_type> c3 (new f_complex_type ("bar"));
+ f_type f3 (1, XSD_MOVE (s3), XSD_MOVE (c3));
assert (f1 == f2);
assert (f1 == f3);
diff --git a/tests/cxx/tree/complex/ctor/makefile b/tests/cxx/tree/complex/ctor/makefile
index 6408105..1b0bc11 100644
--- a/tests/cxx/tree/complex/ctor/makefile
+++ b/tests/cxx/tree/complex/ctor/makefile
@@ -76,8 +76,12 @@ endif
$(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,$(scf_root)/xsd/tree/xsd-cxx.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.
#
diff --git a/tests/cxx/tree/containment/driver.cxx b/tests/cxx/tree/containment/driver.cxx
index ac798a6..aa701ae 100644
--- a/tests/cxx/tree/containment/driver.cxx
+++ b/tests/cxx/tree/containment/driver.cxx
@@ -6,11 +6,18 @@
// Test tree node containment.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <cassert>
#include "test.hxx"
+#ifdef XSD_CXX11
+# include <utility> // std::move
+# define XSD_MOVE(x) std::move(x)
+#else
+# define XSD_MOVE(x) x
+#endif
+
using namespace std;
using namespace test;
@@ -20,11 +27,11 @@ main ()
// Change of a container in a sub-tree without ID.
//
{
- auto_ptr<inner> i (new inner ());
+ XSD_AUTO_PTR<inner> i (new inner ());
i->ref ("foo");
outer o;
- o.i (i);
+ o.i (XSD_MOVE (i));
o.ref ("foo");
assert (o.i ()->ref ()->get () == 0);
@@ -34,14 +41,14 @@ main ()
// Change of container in a sub-tree with ID inside.
//
{
- auto_ptr<inner> i (new inner ());
+ XSD_AUTO_PTR<inner> i (new inner ());
inner* p (i.get ());
i->id ("foo");
i->ref ("foo");
assert (i->ref ()->get () == p);
outer o;
- o.i (i);
+ o.i (XSD_MOVE (i));
o.ref ("foo");
assert (o.i ()->ref ()->get () == p);
@@ -51,10 +58,10 @@ main ()
// Change of a container in ID.
//
{
- auto_ptr<xml_schema::id> id (new xml_schema::id ("foo"));
+ XSD_AUTO_PTR<xml_schema::id> id (new xml_schema::id ("foo"));
inner i;
- i.id (id);
+ i.id (XSD_MOVE (id));
i.ref ("foo");
assert (i.ref ()->get () == &i);
}
@@ -62,12 +69,12 @@ main ()
// Change of a container in a type derived from ID with ID inside.
//
{
- auto_ptr<id_ex> id (new id_ex ("foo"));
+ XSD_AUTO_PTR<id_ex> id (new id_ex ("foo"));
id_ex* p (id.get ());
id->id ("bar");
inner i;
- i.id_ex (id);
+ i.id_ex (XSD_MOVE (id));
i.ref ("foo");
assert (i.ref ()->get () == &i);
@@ -81,28 +88,28 @@ main ()
{
id i1 ("a"), i2 ("b");
- auto_ptr<ids> ic (new ids);
+ XSD_AUTO_PTR<ids> ic (new ids);
ic->id ().push_back (i1);
ic->id ().push_back (i2);
- auto_ptr<xml_schema::idrefs> r1 (new xml_schema::idrefs);
+ XSD_AUTO_PTR<xml_schema::idrefs> r1 (new xml_schema::idrefs);
r1->push_back (xml_schema::idref ("a"));
r1->push_back (xml_schema::idref ("b"));
- auto_ptr<idref_list> r2 (new idref_list);
+ XSD_AUTO_PTR<idref_list> r2 (new idref_list);
r2->push_back (xml_schema::idref ("a"));
r2->push_back (xml_schema::idref ("b"));
- auto_ptr<idrefs1> rc1 (new idrefs1);
- auto_ptr<idrefs2> rc2 (new idrefs2);
+ XSD_AUTO_PTR<idrefs1> rc1 (new idrefs1);
+ XSD_AUTO_PTR<idrefs2> rc2 (new idrefs2);
- rc1->idrefs (r1);
- rc2->idrefs (r2);
+ rc1->idrefs (XSD_MOVE (r1));
+ rc2->idrefs (XSD_MOVE (r2));
model m;
- m.ids (ic);
- m.idrefs1 (rc1);
- m.idrefs2 (rc2);
+ m.ids (XSD_MOVE (ic));
+ m.idrefs1 (XSD_MOVE (rc1));
+ m.idrefs2 (XSD_MOVE (rc2));
assert (m.idrefs1 ().idrefs ()[0].get () != 0);
assert (m.idrefs1 ().idrefs ()[1].get () != 0);
diff --git a/tests/cxx/tree/containment/makefile b/tests/cxx/tree/containment/makefile
index fb239c4..ba34bdd 100644
--- a/tests/cxx/tree/containment/makefile
+++ b/tests/cxx/tree/containment/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/default/general/driver.cxx b/tests/cxx/tree/default/general/driver.cxx
index e9e5528..4c9cfc4 100644
--- a/tests/cxx/tree/default/general/driver.cxx
+++ b/tests/cxx/tree/default/general/driver.cxx
@@ -6,7 +6,7 @@
// Test default attribute/element values.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1], xml_schema::flags::dont_validate));
+ XSD_AUTO_PTR<type> r (root (argv[1], xml_schema::flags::dont_validate));
xml_schema::namespace_infomap map;
map["t"].name = "test";
diff --git a/tests/cxx/tree/default/general/makefile b/tests/cxx/tree/default/general/makefile
index 432c56c..045f085 100644
--- a/tests/cxx/tree/default/general/makefile
+++ b/tests/cxx/tree/default/general/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/default/omit/driver.cxx b/tests/cxx/tree/default/omit/driver.cxx
index f01ce1a..84c30ce 100644
--- a/tests/cxx/tree/default/omit/driver.cxx
+++ b/tests/cxx/tree/default/omit/driver.cxx
@@ -6,7 +6,7 @@
// Test default attribute omission from the output.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1], xml_schema::flags::dont_validate));
+ XSD_AUTO_PTR<type> r (root (argv[1], xml_schema::flags::dont_validate));
cout << *r << endl
<< "default x: " << derived::x_default_value () << endl
diff --git a/tests/cxx/tree/default/omit/makefile b/tests/cxx/tree/default/omit/makefile
index 4b3b61e..710ab48 100644
--- a/tests/cxx/tree/default/omit/makefile
+++ b/tests/cxx/tree/default/omit/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/detach/driver.cxx b/tests/cxx/tree/detach/driver.cxx
index 8317ac4..e752c13 100644
--- a/tests/cxx/tree/detach/driver.cxx
+++ b/tests/cxx/tree/detach/driver.cxx
@@ -6,17 +6,26 @@
// Test the detach functionality.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <cassert>
#include "test.hxx"
+#ifdef XSD_CXX11
+# include <utility> // std::move
+# define XSD_MOVE(x) std::move(x)
+#else
+# define XSD_MOVE(x) x
+#endif
+
using namespace std;
using namespace test;
int
main ()
{
+ using test::ref;
+
// Construct the model.
//
object o1 ("o1");
@@ -57,22 +66,22 @@ main ()
// Detach one.
//
- auto_ptr<subtree> p (m.detach_one ());
+ XSD_AUTO_PTR<subtree> p (m.detach_one ());
assert (p->_container () == 0);
assert (p->r ()[0].get () == &p->o ()[1]);
assert (m.opt ()->r ()[1].get () == 0);
- m.one (p);
+ m.one (XSD_MOVE (p));
assert (m.opt ()->r ()[1].get () == &m.one ().o ()[0]);
p = m.detach_one ();
model m1;
- m1.one (p);
+ m1.one (XSD_MOVE (p));
m1.opt (s2);
assert (m1.opt ()->r ()[1].get () == &m1.one ().o ()[0]);
p = m1.detach_one ();
- m.seq ().push_back (p);
+ m.seq ().push_back (XSD_MOVE (p));
// Detach opt.
//
@@ -82,7 +91,7 @@ main ()
assert (p->r ()[0].get () == &p->o ()[1]);
assert (m.seq ()[0].r ()[1].get () == 0);
- m.seq ().push_back (p);
+ m.seq ().push_back (XSD_MOVE (p));
// Detach seq.
//
@@ -91,7 +100,7 @@ main ()
assert (p->r ()[0].get () == &p->o ()[1]);
assert (m.seq ()[0].r ()[1].get () == 0);
- m.seq ().push_back (p);
+ m.seq ().push_back (XSD_MOVE (p));
assert (m.seq ()[0].r ()[1].get () == &m.seq ()[1].o ()[0]);
m.seq ().detach (m.seq ().begin (), p);
diff --git a/tests/cxx/tree/detach/makefile b/tests/cxx/tree/detach/makefile
index 7689898..cf85a7a 100644
--- a/tests/cxx/tree/detach/makefile
+++ b/tests/cxx/tree/detach/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/dom-association/dom-parse.cxx b/tests/cxx/tree/dom-association/dom-parse.cxx
new file mode 100644
index 0000000..c21a47f
--- /dev/null
+++ b/tests/cxx/tree/dom-association/dom-parse.cxx
@@ -0,0 +1,97 @@
+// file : tests/cxx/tree/dom-association/dom-parse.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2006-2011 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "dom-parse.hxx"
+
+#include <istream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+XSD_DOM_AUTO_PTR<DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate)
+{
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ // Get an implementation of the Load-Store (LS) interface.
+ //
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ XSD_DOM_AUTO_PTR<DOMLSParser> parser (
+ impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Discard comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, false);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable/Disable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, validate);
+ conf->setParameter (XMLUni::fgXercesSchema, validate);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Prepare input stream.
+ //
+ xml::sax::std_input_source isrc (is, id);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ XSD_DOM_AUTO_PTR<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<tree::parsing<char> > ();
+
+ return doc;
+}
diff --git a/tests/cxx/tree/dom-association/dom-parse.hxx b/tests/cxx/tree/dom-association/dom-parse.hxx
new file mode 100644
index 0000000..75a5e8b
--- /dev/null
+++ b/tests/cxx/tree/dom-association/dom-parse.hxx
@@ -0,0 +1,25 @@
+// file : tests/cxx/tree/dom-association/dom-parse.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2006-2011 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef DOM_PARSE
+#define DOM_PARSE
+
+#include <string>
+#include <iosfwd>
+
+#include <xercesc/dom/DOMDocument.hpp>
+
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+
+// Parse an XML document from the standard input stream with an
+// optional resource id. Resource id is used in diagnostics as
+// well as to locate schemas referenced from inside the document.
+//
+XSD_DOM_AUTO_PTR<xercesc::DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate);
+
+#endif // DOM_PARSE
diff --git a/tests/cxx/tree/dom-association/driver.cxx b/tests/cxx/tree/dom-association/driver.cxx
new file mode 100644
index 0000000..d0fd33b
--- /dev/null
+++ b/tests/cxx/tree/dom-association/driver.cxx
@@ -0,0 +1,73 @@
+// file : tests/cxx/tree/dom-association/driver.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2006-2011 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test DOM association/ownership.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+
+#include "dom-parse.hxx"
+#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;
+ }
+
+ int r (0);
+
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ DOMDocument* ptr;
+
+#ifdef XSD_CXX11
+ xml_schema::dom::unique_ptr<DOMDocument> doc (parse (ifs, argv[1], true));
+ ptr = doc.get ();
+ unique_ptr<type> r (
+ root (std::move (doc),
+ xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
+#else
+ xml_schema::dom::auto_ptr<DOMDocument> doc (parse (ifs, argv[1], true));
+ ptr = doc.get ();
+ auto_ptr<type> r (
+ root (doc,
+ xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
+#endif
+
+ assert (doc.get () == 0);
+ assert (r->_node ()->getOwnerDocument () == ptr);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/tests/cxx/tree/dom-association/makefile b/tests/cxx/tree/dom-association/makefile
new file mode 100644
index 0000000..a57e5b1
--- /dev/null
+++ b/tests/cxx/tree/dom-association/makefile
@@ -0,0 +1,93 @@
+# file : tests/cxx/tree/dom-association/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2011 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
+
+xsd := test.xsd
+cxx := driver.cxx dom-parse.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)
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
+ifeq ($(cxx_standard),c++11)
+$(obj) $(dep): cpp_options += -DXSD_CXX11
+endif
+
+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-ostream
+$(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)
+
+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/dom-association/output b/tests/cxx/tree/dom-association/output
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/cxx/tree/dom-association/output
diff --git a/tests/cxx/tree/dom-association/test.xml b/tests/cxx/tree/dom-association/test.xml
new file mode 100644
index 0000000..624a80c
--- /dev/null
+++ b/tests/cxx/tree/dom-association/test.xml
@@ -0,0 +1,7 @@
+<t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <a>a</a>
+
+</t:root>
diff --git a/tests/cxx/tree/dom-association/test.xsd b/tests/cxx/tree/dom-association/test.xsd
new file mode 100644
index 0000000..07bebc7
--- /dev/null
+++ b/tests/cxx/tree/dom-association/test.xsd
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">
+
+ <complexType name="type">
+ <sequence>
+ <element name="a" type="string"/>
+ </sequence>
+ </complexType>
+
+ <element name="root" type="t:type"/>
+
+</schema>
diff --git a/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx b/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
index b134da2..591d73f 100644
--- a/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
+++ b/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
@@ -6,7 +6,7 @@
// Test ISO-8859-1 encoding.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <fstream>
#include <iostream>
@@ -36,7 +36,7 @@ main (int argc, char* argv[])
}
xsd::cxx::xml::char_transcoder::unrep_char ('?');
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
{
type::a_sequence const& s (r->a ());
diff --git a/tests/cxx/tree/encoding/char/iso-8859-1/makefile b/tests/cxx/tree/encoding/char/iso-8859-1/makefile
index 00257fd..8708b49 100644
--- a/tests/cxx/tree/encoding/char/iso-8859-1/makefile
+++ b/tests/cxx/tree/encoding/char/iso-8859-1/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/encoding/char/lcp/driver.cxx b/tests/cxx/tree/encoding/char/lcp/driver.cxx
index c33ba27..456dc09 100644
--- a/tests/cxx/tree/encoding/char/lcp/driver.cxx
+++ b/tests/cxx/tree/encoding/char/lcp/driver.cxx
@@ -7,7 +7,7 @@
// The test just makes sure it still compiles and works.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <fstream>
#include <iostream>
@@ -27,7 +27,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
xml_schema::namespace_infomap map;
map["t"].name = "test";
diff --git a/tests/cxx/tree/encoding/char/lcp/makefile b/tests/cxx/tree/encoding/char/lcp/makefile
index 627ddb3..37511e0 100644
--- a/tests/cxx/tree/encoding/char/lcp/makefile
+++ b/tests/cxx/tree/encoding/char/lcp/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/encoding/char/utf-8/driver.cxx b/tests/cxx/tree/encoding/char/utf-8/driver.cxx
index 5da863c..f580f51 100644
--- a/tests/cxx/tree/encoding/char/utf-8/driver.cxx
+++ b/tests/cxx/tree/encoding/char/utf-8/driver.cxx
@@ -6,7 +6,7 @@
// Test UTF-8 encoding.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <fstream>
#include <iostream>
@@ -26,7 +26,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
{
type::a_sequence const& s (r->a ());
diff --git a/tests/cxx/tree/encoding/char/utf-8/makefile b/tests/cxx/tree/encoding/char/utf-8/makefile
index 9e51cf0..a7e94bf 100644
--- a/tests/cxx/tree/encoding/char/utf-8/makefile
+++ b/tests/cxx/tree/encoding/char/utf-8/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/encoding/wchar/driver.cxx b/tests/cxx/tree/encoding/wchar/driver.cxx
index fde45fa..b3316d2 100644
--- a/tests/cxx/tree/encoding/wchar/driver.cxx
+++ b/tests/cxx/tree/encoding/wchar/driver.cxx
@@ -6,7 +6,7 @@
// Test the wide character mapping.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <fstream>
#include <iostream>
@@ -29,7 +29,7 @@ main (int argc, char* argv[])
// Use dont_validate because we do not have instance's system id (path).
//
std::ifstream ifs (argv[1]);
- auto_ptr<type> r (root (ifs, xml_schema::flags::dont_validate));
+ XSD_AUTO_PTR<type> r (root (ifs, xml_schema::flags::dont_validate));
{
type::b_sequence const& s (r->b ());
diff --git a/tests/cxx/tree/encoding/wchar/makefile b/tests/cxx/tree/encoding/wchar/makefile
index af7f034..d2ce82b 100644
--- a/tests/cxx/tree/encoding/wchar/makefile
+++ b/tests/cxx/tree/encoding/wchar/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/enumeration/ctor/makefile b/tests/cxx/tree/enumeration/ctor/makefile
index 947bdfc..9f6162c 100644
--- a/tests/cxx/tree/enumeration/ctor/makefile
+++ b/tests/cxx/tree/enumeration/ctor/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/enumeration/inheritance/driver.cxx b/tests/cxx/tree/enumeration/inheritance/driver.cxx
index 1842982..4fb05a1 100644
--- a/tests/cxx/tree/enumeration/inheritance/driver.cxx
+++ b/tests/cxx/tree/enumeration/inheritance/driver.cxx
@@ -6,7 +6,7 @@
// Insert test description here.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <cassert>
#include <iostream>
@@ -26,7 +26,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<top_bottom> r (root (argv[1]));
+ XSD_AUTO_PTR<top_bottom> r (root (argv[1]));
switch (*r)
{
diff --git a/tests/cxx/tree/enumeration/inheritance/makefile b/tests/cxx/tree/enumeration/inheritance/makefile
index 54f9a3c..cdce770 100644
--- a/tests/cxx/tree/enumeration/inheritance/makefile
+++ b/tests/cxx/tree/enumeration/inheritance/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/float/driver.cxx b/tests/cxx/tree/float/driver.cxx
index 1c073d8..1277275 100644
--- a/tests/cxx/tree/float/driver.cxx
+++ b/tests/cxx/tree/float/driver.cxx
@@ -7,7 +7,7 @@
// and serialization.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -26,7 +26,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
r->simple ().push_back (12.129456);
r->simple ().push_back (123.129456);
diff --git a/tests/cxx/tree/float/makefile b/tests/cxx/tree/float/makefile
index 03e0201..ebfbc7e 100644
--- a/tests/cxx/tree/float/makefile
+++ b/tests/cxx/tree/float/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/list/ctor/makefile b/tests/cxx/tree/list/ctor/makefile
index 6b3c5e0..6131287 100644
--- a/tests/cxx/tree/list/ctor/makefile
+++ b/tests/cxx/tree/list/ctor/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/makefile b/tests/cxx/tree/makefile
index 9825601..cfc0847 100644
--- a/tests/cxx/tree/makefile
+++ b/tests/cxx/tree/makefile
@@ -5,26 +5,27 @@
include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-tests := \
-built-in \
-chameleon \
-comparison \
-compilation \
-complex \
-containment \
-default \
-detach \
-encoding \
-enumeration \
-float \
-list \
-name-clash \
-naming \
-polymorphism \
-prefix \
-test-template \
-types-only \
-union \
+tests := \
+built-in \
+chameleon \
+comparison \
+compilation \
+complex \
+containment \
+default \
+detach \
+dom-association \
+encoding \
+enumeration \
+float \
+list \
+name-clash \
+naming \
+polymorphism \
+prefix \
+test-template \
+types-only \
+union \
wildcard
ifeq ($(xsd_with_ace),y)
diff --git a/tests/cxx/tree/name-clash/inheritance/driver.cxx b/tests/cxx/tree/name-clash/inheritance/driver.cxx
index 611d145..2ff5763 100644
--- a/tests/cxx/tree/name-clash/inheritance/driver.cxx
+++ b/tests/cxx/tree/name-clash/inheritance/driver.cxx
@@ -6,7 +6,7 @@
// Test for name clashes across inheritance hierarchy.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<derived> r (root (argv[1]));
+ XSD_AUTO_PTR<derived> r (root (argv[1]));
cout << *r << endl;
}
diff --git a/tests/cxx/tree/name-clash/inheritance/makefile b/tests/cxx/tree/name-clash/inheritance/makefile
index d45cf9c..972de44 100644
--- a/tests/cxx/tree/name-clash/inheritance/makefile
+++ b/tests/cxx/tree/name-clash/inheritance/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/naming/camel/driver.cxx b/tests/cxx/tree/naming/camel/driver.cxx
index d3ea320..fa174d4 100644
--- a/tests/cxx/tree/naming/camel/driver.cxx
+++ b/tests/cxx/tree/naming/camel/driver.cxx
@@ -6,7 +6,6 @@
// Test camel case (upper for types, lower for functions) naming style.
//
-#include <memory> // std::auto_ptr
#include <sstream>
#include <iostream>
diff --git a/tests/cxx/tree/naming/camel/makefile b/tests/cxx/tree/naming/camel/makefile
index 78162db..b6c9498 100644
--- a/tests/cxx/tree/naming/camel/makefile
+++ b/tests/cxx/tree/naming/camel/makefile
@@ -82,7 +82,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/naming/java/driver.cxx b/tests/cxx/tree/naming/java/driver.cxx
index 1c4bfdd..1e4adde 100644
--- a/tests/cxx/tree/naming/java/driver.cxx
+++ b/tests/cxx/tree/naming/java/driver.cxx
@@ -6,7 +6,6 @@
// Test Java naming style.
//
-#include <memory> // std::auto_ptr
#include <sstream>
#include <iostream>
diff --git a/tests/cxx/tree/naming/java/makefile b/tests/cxx/tree/naming/java/makefile
index 9cda154..41c5afd 100644
--- a/tests/cxx/tree/naming/java/makefile
+++ b/tests/cxx/tree/naming/java/makefile
@@ -82,7 +82,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/naming/knr/driver.cxx b/tests/cxx/tree/naming/knr/driver.cxx
index 4960e04..bb980fc 100644
--- a/tests/cxx/tree/naming/knr/driver.cxx
+++ b/tests/cxx/tree/naming/knr/driver.cxx
@@ -6,7 +6,6 @@
// Test K&R naming style.
//
-#include <memory> // std::auto_ptr
#include <sstream>
#include <iostream>
diff --git a/tests/cxx/tree/naming/knr/makefile b/tests/cxx/tree/naming/knr/makefile
index 31836de..370055a 100644
--- a/tests/cxx/tree/naming/knr/makefile
+++ b/tests/cxx/tree/naming/knr/makefile
@@ -82,7 +82,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/polymorphism/comparison/driver.cxx b/tests/cxx/tree/polymorphism/comparison/driver.cxx
index 049cc45..9a2f222 100644
--- a/tests/cxx/tree/polymorphism/comparison/driver.cxx
+++ b/tests/cxx/tree/polymorphism/comparison/driver.cxx
@@ -6,7 +6,7 @@
// Test comparison of polymorphic object models.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
// Equals.
//
diff --git a/tests/cxx/tree/polymorphism/comparison/makefile b/tests/cxx/tree/polymorphism/comparison/makefile
index 91e541a..3ce8cc9 100644
--- a/tests/cxx/tree/polymorphism/comparison/makefile
+++ b/tests/cxx/tree/polymorphism/comparison/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/polymorphism/ostream/driver.cxx b/tests/cxx/tree/polymorphism/ostream/driver.cxx
index 836c329..9ff8a5f 100644
--- a/tests/cxx/tree/polymorphism/ostream/driver.cxx
+++ b/tests/cxx/tree/polymorphism/ostream/driver.cxx
@@ -6,7 +6,7 @@
// Test printing of polymorphic object models.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
cout << *r << endl;
}
catch (xml_schema::exception const& e)
diff --git a/tests/cxx/tree/polymorphism/ostream/makefile b/tests/cxx/tree/polymorphism/ostream/makefile
index 4512023..2f429db 100644
--- a/tests/cxx/tree/polymorphism/ostream/makefile
+++ b/tests/cxx/tree/polymorphism/ostream/makefile
@@ -76,7 +76,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/polymorphism/same-type/driver.cxx b/tests/cxx/tree/polymorphism/same-type/driver.cxx
index 59ca905..162d397 100644
--- a/tests/cxx/tree/polymorphism/same-type/driver.cxx
+++ b/tests/cxx/tree/polymorphism/same-type/driver.cxx
@@ -6,7 +6,7 @@
// Test substitution group and xsi:type that don't change the type.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
cout << *r << endl;
}
diff --git a/tests/cxx/tree/polymorphism/same-type/makefile b/tests/cxx/tree/polymorphism/same-type/makefile
index 88a7f3d..407fc07 100644
--- a/tests/cxx/tree/polymorphism/same-type/makefile
+++ b/tests/cxx/tree/polymorphism/same-type/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/prefix/driver.cxx b/tests/cxx/tree/prefix/driver.cxx
index 08c416c..5a5bfee 100644
--- a/tests/cxx/tree/prefix/driver.cxx
+++ b/tests/cxx/tree/prefix/driver.cxx
@@ -6,7 +6,7 @@
// Test automatic prefix assignment.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
root (std::cout, *r);
}
catch (xml_schema::exception const& e)
diff --git a/tests/cxx/tree/prefix/makefile b/tests/cxx/tree/prefix/makefile
index 815a970..c1a4703 100644
--- a/tests/cxx/tree/prefix/makefile
+++ b/tests/cxx/tree/prefix/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/test-template/driver.cxx b/tests/cxx/tree/test-template/driver.cxx
index 1bb06cb..0cdb0e4 100644
--- a/tests/cxx/tree/test-template/driver.cxx
+++ b/tests/cxx/tree/test-template/driver.cxx
@@ -6,7 +6,7 @@
// Insert test description here.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <iostream>
#include "test.hxx"
@@ -25,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
cout << *r << endl;
}
diff --git a/tests/cxx/tree/test-template/makefile b/tests/cxx/tree/test-template/makefile
index 77c83e1..734b705 100644
--- a/tests/cxx/tree/test-template/makefile
+++ b/tests/cxx/tree/test-template/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/types-only/driver.cxx b/tests/cxx/tree/types-only/driver.cxx
index 198d8ca..414012e 100644
--- a/tests/cxx/tree/types-only/driver.cxx
+++ b/tests/cxx/tree/types-only/driver.cxx
@@ -7,7 +7,6 @@
// still compiles.
//
-#include <memory> // std::auto_ptr
#include <iostream>
#include "test.hxx"
diff --git a/tests/cxx/tree/types-only/makefile b/tests/cxx/tree/types-only/makefile
index 9cca14a..66c7a95 100644
--- a/tests/cxx/tree/types-only/makefile
+++ b/tests/cxx/tree/types-only/makefile
@@ -74,7 +74,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/union/ctor/makefile b/tests/cxx/tree/union/ctor/makefile
index 6bb4887..38b4354 100644
--- a/tests/cxx/tree/union/ctor/makefile
+++ b/tests/cxx/tree/union/ctor/makefile
@@ -75,7 +75,12 @@ endif
$(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.
diff --git a/tests/cxx/tree/wildcard/driver.cxx b/tests/cxx/tree/wildcard/driver.cxx
index d784a97..9798159 100644
--- a/tests/cxx/tree/wildcard/driver.cxx
+++ b/tests/cxx/tree/wildcard/driver.cxx
@@ -6,13 +6,13 @@
// Test wildcard (any & anyAttribute) mapping.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <sstream>
#include <iostream>
-#include <xsd/cxx/xml/string.hxx>
+#include "test.hxx" // Get XSD_CXX11 defined.
-#include "test.hxx"
+#include <xsd/cxx/xml/string.hxx>
using namespace std;
using namespace test;
@@ -170,7 +170,7 @@ main (int argc, char* argv[])
// Test parsing
//
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
print (*r);
// Test serialization.
@@ -187,7 +187,7 @@ main (int argc, char* argv[])
// cout << iostr.str () << endl
// << endl;
- auto_ptr<type> copy (root (iostr, argv[1]));
+ XSD_AUTO_PTR<type> copy (root (iostr, argv[1]));
assert (*copy == *r);
print (*copy);
diff --git a/tests/cxx/tree/wildcard/makefile b/tests/cxx/tree/wildcard/makefile
index 9b6a994..4adc8b9 100644
--- a/tests/cxx/tree/wildcard/makefile
+++ b/tests/cxx/tree/wildcard/makefile
@@ -75,7 +75,12 @@ endif
$(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.