diff options
Diffstat (limited to 'xsd/tests/cxx/tree/default')
-rw-r--r-- | xsd/tests/cxx/tree/default/general/driver.cxx | 7 | ||||
-rw-r--r-- | xsd/tests/cxx/tree/default/general/makefile | 14 | ||||
-rw-r--r-- | xsd/tests/cxx/tree/default/general/output | 13 | ||||
-rw-r--r-- | xsd/tests/cxx/tree/default/makefile | 3 | ||||
-rw-r--r-- | xsd/tests/cxx/tree/default/omit/driver.cxx | 7 | ||||
-rw-r--r-- | xsd/tests/cxx/tree/default/omit/makefile | 14 | ||||
-rw-r--r-- | xsd/tests/cxx/tree/default/omit/output | 2 |
7 files changed, 25 insertions, 35 deletions
diff --git a/xsd/tests/cxx/tree/default/general/driver.cxx b/xsd/tests/cxx/tree/default/general/driver.cxx index a48650f..b0df8ba 100644 --- a/xsd/tests/cxx/tree/default/general/driver.cxx +++ b/xsd/tests/cxx/tree/default/general/driver.cxx @@ -1,12 +1,11 @@ // file : tests/cxx/tree/default/general/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// 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 default attribute/element values. // -#include <memory> // std::auto_ptr +#include <memory> // std::auto_ptr/unique_ptr #include <iostream> #include "test.hxx" @@ -25,7 +24,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/xsd/tests/cxx/tree/default/general/makefile b/xsd/tests/cxx/tree/default/general/makefile index b1b7fca..6c2dfe6 100644 --- a/xsd/tests/cxx/tree/default/general/makefile +++ b/xsd/tests/cxx/tree/default/general/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/tree/default/general/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# 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-ostream --generate-serialization \ +$(gen): xsd_options += --generate-ostream --generate-serialization \ --generate-default-ctor --generate-from-base-ctor $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -75,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/xsd/tests/cxx/tree/default/general/output b/xsd/tests/cxx/tree/default/general/output index 72a8fa4..396a698 100644 --- a/xsd/tests/cxx/tree/default/general/output +++ b/xsd/tests/cxx/tree/default/general/output @@ -1,28 +1,15 @@ <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <t:root xmlns:t="test" base64_bin1="" base64_bin2="YmFzZTY0IGJpbmFyeQ==
" bool1="true" bool2="true" bool3="false" bool4="false" byte="-99" decimal1="1.12345" decimal2="-0.456" double1="1.12345" double2="1123.45" double3="-0.00012345" double4="NaN" double5="-INF" fix1="123" fix2="123" fix3="abc" fix4="abc" fix5="aaa bbb ccc" fix6="aaa bbb ccc" float1="1.123" float2="1123" float3="-0.000123" float4="NaN" float5="-INF" hex_bin1="" hex_bin2="6865782052696E617279" id="this" idref="this" idrefs="this" int="-99999" integer="-99999" language="en-us" long="-99999" ncname="abcd" ninteger="-99999" nmtoken="ab:cd" nmtokens1="a:b efg aaa" nmtokens2="abc" nninteger="99999" npinteger="-99999" nstring=" a b " pinteger="99999" qname1="foo" qname2="t:bar" short="-999" string1="" string2=" a b " token="a b" ubyte="99" uint="99999" ulong="99999" uri="http://example.com" ushort="999"> - <union a="abc"/> - <list a="123 345 678" b="ab cd ef" c="abc" d="abc def"/> - <simple a="123" b="abc" c="123" d="abc" e="abc" f="abc 123"/> - <date a="2009-03-31" b="2009-03-31Z" c="2009-03-31Z" d="2009-03-31Z" e="2009-03-31+12:30" f="2009-03-31-12:30" g="2002009-03-31-12:30"/> - <time a="12:03:45" b="12:03:45.123Z" c="12:03:05.123Z" d="12:03:45.123Z" e="12:03:45.123+12:30" f="12:03:45-12:30"/> - <date-time a="2009-03-31T12:03:45" b="2009-03-31T12:03:45.123Z" c="2002009-03-31T12:03:05.123-12:30"/> - <duration a="P100Y" b="P100M" c="P100D" d="PT12H" e="PT12M" f="PT12.123S" g="-P100Y10M20DT12H12M1.123S"/> - <day a="---02" b="---22Z" c="---22-12:30"/> - <month a="--02" b="--12Z" c="--12+12:30"/> - <year a="2009" b="-2002009Z" c="2009-12:30"/> - <month-day a="--02-02" b="--12-22Z" c="--12-22+12:30"/> - <year-month a="2009-02" b="-2002009-12Z" c="2009-12-12:30"/> - </t:root> diff --git a/xsd/tests/cxx/tree/default/makefile b/xsd/tests/cxx/tree/default/makefile index 218e69c..56fa53d 100644 --- a/xsd/tests/cxx/tree/default/makefile +++ b/xsd/tests/cxx/tree/default/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/tree/default/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# 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 diff --git a/xsd/tests/cxx/tree/default/omit/driver.cxx b/xsd/tests/cxx/tree/default/omit/driver.cxx index cbf69b5..6a074c1 100644 --- a/xsd/tests/cxx/tree/default/omit/driver.cxx +++ b/xsd/tests/cxx/tree/default/omit/driver.cxx @@ -1,12 +1,11 @@ // file : tests/cxx/tree/default/omit/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// 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 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 +24,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/xsd/tests/cxx/tree/default/omit/makefile b/xsd/tests/cxx/tree/default/omit/makefile index e0cce27..caaec12 100644 --- a/xsd/tests/cxx/tree/default/omit/makefile +++ b/xsd/tests/cxx/tree/default/omit/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/tree/default/omit/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# 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-ostream --generate-serialization \ +$(gen): xsd_options += --generate-ostream --generate-serialization \ --generate-default-ctor --generate-from-base-ctor --omit-default-attributes $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -75,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/xsd/tests/cxx/tree/default/omit/output b/xsd/tests/cxx/tree/default/omit/output index eef99a3..150ad58 100644 --- a/xsd/tests/cxx/tree/default/omit/output +++ b/xsd/tests/cxx/tree/default/omit/output @@ -13,9 +13,7 @@ fixed q1: 1 fixed q2: 2 <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <t:root xmlns:t="test"> - <derived q1="1" q2="2"> <a>a</a> </derived> - </t:root> |