From bada6666c70977a058755ccf232e7d67b24adeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:21:29 +0200 Subject: New upstream release --- xsd/tests/cxx/tree/polymorphism/ostream/driver.cxx | 7 +++---- xsd/tests/cxx/tree/polymorphism/ostream/makefile | 16 ++++++++++------ xsd/tests/cxx/tree/polymorphism/ostream/output | 5 +++++ xsd/tests/cxx/tree/polymorphism/ostream/test.xml | 13 +++++++------ xsd/tests/cxx/tree/polymorphism/ostream/test.xsd | 18 ++++++++++++++++-- 5 files changed, 41 insertions(+), 18 deletions(-) (limited to 'xsd/tests/cxx/tree/polymorphism/ostream') diff --git a/xsd/tests/cxx/tree/polymorphism/ostream/driver.cxx b/xsd/tests/cxx/tree/polymorphism/ostream/driver.cxx index 216c887..bfbd2d4 100644 --- a/xsd/tests/cxx/tree/polymorphism/ostream/driver.cxx +++ b/xsd/tests/cxx/tree/polymorphism/ostream/driver.cxx @@ -1,12 +1,11 @@ // file : tests/cxx/tree/polymorphism/ostream/driver.cxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test printing of polymorphic object models. // -#include // std::auto_ptr +#include // std::auto_ptr/unique_ptr #include #include "test.hxx" @@ -25,7 +24,7 @@ main (int argc, char* argv[]) try { - auto_ptr r (root (argv[1])); + XSD_AUTO_PTR r (root (argv[1])); cout << *r << endl; } catch (xml_schema::exception const& e) diff --git a/xsd/tests/cxx/tree/polymorphism/ostream/makefile b/xsd/tests/cxx/tree/polymorphism/ostream/makefile index 661ba16..76a366f 100644 --- a/xsd/tests/cxx/tree/polymorphism/ostream/makefile +++ b/xsd/tests/cxx/tree/polymorphism/ostream/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/tree/polymorphism/ostream/makefile -# author : Boris Kolpackov -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -27,18 +26,18 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(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-polymorphic --polymorphic-type-all \ ---generate-ostream +$(gen): xsd_options += --generate-polymorphic --polymorphic-type-all \ +--root-element root --generate-ostream $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -76,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/xsd/tests/cxx/tree/polymorphism/ostream/output b/xsd/tests/cxx/tree/polymorphism/ostream/output index bf0e814..e7fbd68 100644 --- a/xsd/tests/cxx/tree/polymorphism/ostream/output +++ b/xsd/tests/cxx/tree/polymorphism/ostream/output @@ -11,3 +11,8 @@ a: a fund: 1 c: c1 c: c2 +base: +a: a +fund: 1 +d: d1 +d: d2 diff --git a/xsd/tests/cxx/tree/polymorphism/ostream/test.xml b/xsd/tests/cxx/tree/polymorphism/ostream/test.xml index 157e15c..5409d2a 100644 --- a/xsd/tests/cxx/tree/polymorphism/ostream/test.xml +++ b/xsd/tests/cxx/tree/polymorphism/ostream/test.xml @@ -1,9 +1,10 @@ - + a1 - a1b - a1c1c2 + a1b + a1c1c2 + a1d1d2 - + diff --git a/xsd/tests/cxx/tree/polymorphism/ostream/test.xsd b/xsd/tests/cxx/tree/polymorphism/ostream/test.xsd index cc1f7a8..ddeaeae 100644 --- a/xsd/tests/cxx/tree/polymorphism/ostream/test.xsd +++ b/xsd/tests/cxx/tree/polymorphism/ostream/test.xsd @@ -1,5 +1,6 @@ - + @@ -7,6 +8,7 @@ + @@ -28,9 +30,21 @@ + + + + + + + + + + + + - + -- cgit v1.2.3