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/binary/cdr/driver.cxx | 17 ++++++++++++----- xsd/tests/cxx/tree/binary/cdr/makefile | 16 ++++++++++------ xsd/tests/cxx/tree/binary/cdr/test.xml | 4 +++- xsd/tests/cxx/tree/binary/cdr/test.xsd | 3 +++ 4 files changed, 28 insertions(+), 12 deletions(-) (limited to 'xsd/tests/cxx/tree/binary/cdr') diff --git a/xsd/tests/cxx/tree/binary/cdr/driver.cxx b/xsd/tests/cxx/tree/binary/cdr/driver.cxx index 42ca181..a2d7195 100644 --- a/xsd/tests/cxx/tree/binary/cdr/driver.cxx +++ b/xsd/tests/cxx/tree/binary/cdr/driver.cxx @@ -1,12 +1,11 @@ // file : tests/cxx/tree/binary/cdr/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 non-polymorphic binary serialization to ACE CDR. // -#include // std::auto_ptr +#include // std::auto_ptr/unique_ptr #include #include @@ -26,7 +25,7 @@ main (int argc, char* argv[]) try { - auto_ptr r (root (argv[1])); + XSD_AUTO_PTR r (root (argv[1])); // Save to a CDR stream. // @@ -38,7 +37,7 @@ main (int argc, char* argv[]) // ACE_InputCDR ace_icdr (ace_ocdr); xml_schema::istream icdr (ace_icdr); - auto_ptr c (new type (icdr)); + XSD_AUTO_PTR c (new type (icdr)); // Compare the two. // @@ -128,6 +127,14 @@ main (int argc, char* argv[]) assert (r->time () == c->time ()); assert (r->date_time () == c->date_time ()); assert (r->duration () == c->duration ()); + + // anySimpleType + // + assert (!r->any_simple_type_attr ().text_content ().empty ()); + assert (r->any_simple_type_attr () == c->any_simple_type_attr ()); + + assert (!r->any_simple_type ().text_content ().empty ()); + assert (r->any_simple_type () == c->any_simple_type ()); } catch (xml_schema::exception const& e) { diff --git a/xsd/tests/cxx/tree/binary/cdr/makefile b/xsd/tests/cxx/tree/binary/cdr/makefile index 67437dc..eb80d35 100644 --- a/xsd/tests/cxx/tree/binary/cdr/makefile +++ b/xsd/tests/cxx/tree/binary/cdr/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/tree/binary/cdr/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 @@ -30,18 +29,18 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) $(ace.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) $(ace.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-insertion ACE_OutputCDR \ ---generate-extraction ACE_InputCDR +$(gen): xsd_options += --generate-insertion ACE_OutputCDR \ +--generate-extraction ACE_InputCDR --generate-comparison $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -78,7 +77,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/binary/cdr/test.xml b/xsd/tests/cxx/tree/binary/cdr/test.xml index 928b4cf..5cedd98 100644 --- a/xsd/tests/cxx/tree/binary/cdr/test.xml +++ b/xsd/tests/cxx/tree/binary/cdr/test.xml @@ -1,6 +1,7 @@ + xsi:schemaLocation="test test.xsd" + any_simple_type_attr="any simple content"> 1 2 3 @@ -87,5 +88,6 @@ 2001-11+02:00 + any simple content in element diff --git a/xsd/tests/cxx/tree/binary/cdr/test.xsd b/xsd/tests/cxx/tree/binary/cdr/test.xsd index e593f64..0629e94 100644 --- a/xsd/tests/cxx/tree/binary/cdr/test.xsd +++ b/xsd/tests/cxx/tree/binary/cdr/test.xsd @@ -112,7 +112,10 @@ + + + -- cgit v1.2.3