From cc5cdb07e40f30e614bd15d81a5091faf717f4f4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 30 Jul 2014 10:19:30 +0200 Subject: Add support for abstract complex types in C++/Tree --- tests/cxx/tree/polymorphism/comparison/driver.cxx | 12 ++++++++++++ tests/cxx/tree/polymorphism/comparison/makefile | 2 +- tests/cxx/tree/polymorphism/comparison/test.xsd | 2 +- tests/cxx/tree/polymorphism/ostream/test.xsd | 13 +++++++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) (limited to 'tests/cxx/tree/polymorphism') diff --git a/tests/cxx/tree/polymorphism/comparison/driver.cxx b/tests/cxx/tree/polymorphism/comparison/driver.cxx index 5394991..d291f6c 100644 --- a/tests/cxx/tree/polymorphism/comparison/driver.cxx +++ b/tests/cxx/tree/polymorphism/comparison/driver.cxx @@ -6,6 +6,7 @@ // #include // std::auto_ptr/unique_ptr +#include #include #include "test.hxx" @@ -65,6 +66,17 @@ main (int argc, char* argv[]) assert (*r != r1); } + + xml_schema::namespace_infomap map; + + map["t"].name = "test"; + + stringstream s; + root (s, *r, map); + + XSD_AUTO_PTR c (root (s, xml_schema::flags::dont_validate)); + + assert (*r == *c); } catch (xml_schema::exception const& e) { diff --git a/tests/cxx/tree/polymorphism/comparison/makefile b/tests/cxx/tree/polymorphism/comparison/makefile index ef3e70a..6ab3e92 100644 --- a/tests/cxx/tree/polymorphism/comparison/makefile +++ b/tests/cxx/tree/polymorphism/comparison/makefile @@ -34,7 +34,7 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd $(gen): xsd_options += --generate-polymorphic --polymorphic-type base \ ---generate-comparison +--generate-comparison --generate-serialization $(gen): $(out_root)/xsd/xsd $(call include-dep,$(dep),$(obj),$(gen)) diff --git a/tests/cxx/tree/polymorphism/comparison/test.xsd b/tests/cxx/tree/polymorphism/comparison/test.xsd index 18532f2..364d1b3 100644 --- a/tests/cxx/tree/polymorphism/comparison/test.xsd +++ b/tests/cxx/tree/polymorphism/comparison/test.xsd @@ -1,7 +1,7 @@ - + diff --git a/tests/cxx/tree/polymorphism/ostream/test.xsd b/tests/cxx/tree/polymorphism/ostream/test.xsd index ddeaeae..688cd5a 100644 --- a/tests/cxx/tree/polymorphism/ostream/test.xsd +++ b/tests/cxx/tree/polymorphism/ostream/test.xsd @@ -2,12 +2,21 @@ - + - + + + + + + + + + + -- cgit v1.1