summaryrefslogtreecommitdiff
path: root/xsd/tests/cxx/tree/encoding
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/tests/cxx/tree/encoding')
-rw-r--r--xsd/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx7
-rw-r--r--xsd/tests/cxx/tree/encoding/char/iso-8859-1/makefile14
-rw-r--r--xsd/tests/cxx/tree/encoding/char/iso-8859-1/test.std8
-rw-r--r--xsd/tests/cxx/tree/encoding/char/lcp/driver.cxx7
-rw-r--r--xsd/tests/cxx/tree/encoding/char/lcp/makefile14
-rw-r--r--xsd/tests/cxx/tree/encoding/char/lcp/test.std2
-rw-r--r--xsd/tests/cxx/tree/encoding/char/makefile3
-rw-r--r--xsd/tests/cxx/tree/encoding/char/utf-8/driver.cxx9
-rw-r--r--xsd/tests/cxx/tree/encoding/char/utf-8/makefile14
-rw-r--r--xsd/tests/cxx/tree/encoding/char/utf-8/test.stdbin796 -> 230 bytes
-rw-r--r--xsd/tests/cxx/tree/encoding/makefile3
-rw-r--r--xsd/tests/cxx/tree/encoding/wchar/driver.cxx9
-rw-r--r--xsd/tests/cxx/tree/encoding/wchar/makefile14
-rw-r--r--xsd/tests/cxx/tree/encoding/wchar/test.stdbin768 -> 261 bytes
14 files changed, 52 insertions, 52 deletions
diff --git a/xsd/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx b/xsd/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
index 56b2df8..6a92ae0 100644
--- a/xsd/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
+++ b/xsd/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
@@ -1,12 +1,11 @@
// file : tests/cxx/tree/encoding/char/iso-8859-1/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 ISO-8859-1 encoding.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <fstream>
#include <iostream>
@@ -36,7 +35,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/xsd/tests/cxx/tree/encoding/char/iso-8859-1/makefile b/xsd/tests/cxx/tree/encoding/char/iso-8859-1/makefile
index 967357f..8a952f7 100644
--- a/xsd/tests/cxx/tree/encoding/char/iso-8859-1/makefile
+++ b/xsd/tests/cxx/tree/encoding/char/iso-8859-1/makefile
@@ -1,6 +1,5 @@
# file : tests/cxx/tree/encoding/char/iso-8859-1/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 := --char-encoding iso8859-1 --generate-serialization \
+$(gen): xsd_options += --char-encoding iso8859-1 --generate-serialization \
--generate-doxygen
$(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/encoding/char/iso-8859-1/test.std b/xsd/tests/cxx/tree/encoding/char/iso-8859-1/test.std
index ca6297f..d26b30f 100644
--- a/xsd/tests/cxx/tree/encoding/char/iso-8859-1/test.std
+++ b/xsd/tests/cxx/tree/encoding/char/iso-8859-1/test.std
@@ -1,18 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<t:root xmlns:t="test">
-
<a>abc</a>
-
<a>æ</a>
-
<a>¢£¤¥</a>
-
<a>???</a>
-
<b>abc</b>
-
<b>aâc</b>
-
<b>âòbc</b>
-
</t:root>
diff --git a/xsd/tests/cxx/tree/encoding/char/lcp/driver.cxx b/xsd/tests/cxx/tree/encoding/char/lcp/driver.cxx
index 2fb13a3..d44d0fe 100644
--- a/xsd/tests/cxx/tree/encoding/char/lcp/driver.cxx
+++ b/xsd/tests/cxx/tree/encoding/char/lcp/driver.cxx
@@ -1,13 +1,12 @@
// file : tests/cxx/tree/encoding/char/lcp/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 local code page encoding (--char-encoding lcp).
// 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 +26,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/xsd/tests/cxx/tree/encoding/char/lcp/makefile b/xsd/tests/cxx/tree/encoding/char/lcp/makefile
index 518c514..9dc599d 100644
--- a/xsd/tests/cxx/tree/encoding/char/lcp/makefile
+++ b/xsd/tests/cxx/tree/encoding/char/lcp/makefile
@@ -1,6 +1,5 @@
# file : tests/cxx/tree/encoding/char/lcp/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,17 +26,17 @@ $(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-serialization --char-encoding lcp
+$(gen): xsd_options += --generate-serialization --char-encoding lcp
$(gen): $(out_root)/xsd/xsd
-$(call include-dep,$(dep))
+$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
#
@@ -74,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/xsd/tests/cxx/tree/encoding/char/lcp/test.std b/xsd/tests/cxx/tree/encoding/char/lcp/test.std
index cc20ef7..368826d 100644
--- a/xsd/tests/cxx/tree/encoding/char/lcp/test.std
+++ b/xsd/tests/cxx/tree/encoding/char/lcp/test.std
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<t:root xmlns:t="test">
-
<a>abcd</a>
-
</t:root>
diff --git a/xsd/tests/cxx/tree/encoding/char/makefile b/xsd/tests/cxx/tree/encoding/char/makefile
index 3e64dd9..587eeb1 100644
--- a/xsd/tests/cxx/tree/encoding/char/makefile
+++ b/xsd/tests/cxx/tree/encoding/char/makefile
@@ -1,6 +1,5 @@
# file : tests/cxx/tree/encoding/char/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/encoding/char/utf-8/driver.cxx b/xsd/tests/cxx/tree/encoding/char/utf-8/driver.cxx
index 0842203..9d12659 100644
--- a/xsd/tests/cxx/tree/encoding/char/utf-8/driver.cxx
+++ b/xsd/tests/cxx/tree/encoding/char/utf-8/driver.cxx
@@ -1,12 +1,11 @@
// file : tests/cxx/tree/encoding/char/utf-8/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 UTF-8 encoding.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <fstream>
#include <iostream>
@@ -26,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::a_sequence const& s (r->a ());
@@ -57,7 +56,7 @@ main (int argc, char* argv[])
xml_schema::namespace_infomap map;
map["t"].name = "test";
- root (std::cout, *r, map, "UCS-4LE");
+ root (std::cout, *r, map, "ASCII");
}
catch (xml_schema::exception const& e)
{
diff --git a/xsd/tests/cxx/tree/encoding/char/utf-8/makefile b/xsd/tests/cxx/tree/encoding/char/utf-8/makefile
index 8c0256e..e2bbdfc 100644
--- a/xsd/tests/cxx/tree/encoding/char/utf-8/makefile
+++ b/xsd/tests/cxx/tree/encoding/char/utf-8/makefile
@@ -1,6 +1,5 @@
# file : tests/cxx/tree/encoding/char/utf-8/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,17 +26,17 @@ $(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-serialization --generate-doxygen
+$(gen): xsd_options += --generate-serialization --generate-doxygen
$(gen): $(out_root)/xsd/xsd
-$(call include-dep,$(dep))
+$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
#
@@ -74,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/xsd/tests/cxx/tree/encoding/char/utf-8/test.std b/xsd/tests/cxx/tree/encoding/char/utf-8/test.std
index 328fe6d..ffce337 100644
--- a/xsd/tests/cxx/tree/encoding/char/utf-8/test.std
+++ b/xsd/tests/cxx/tree/encoding/char/utf-8/test.std
Binary files differ
diff --git a/xsd/tests/cxx/tree/encoding/makefile b/xsd/tests/cxx/tree/encoding/makefile
index fcadb8c..2108fa2 100644
--- a/xsd/tests/cxx/tree/encoding/makefile
+++ b/xsd/tests/cxx/tree/encoding/makefile
@@ -1,6 +1,5 @@
# file : tests/cxx/tree/encoding/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/encoding/wchar/driver.cxx b/xsd/tests/cxx/tree/encoding/wchar/driver.cxx
index 22cbfb4..6b8d51e 100644
--- a/xsd/tests/cxx/tree/encoding/wchar/driver.cxx
+++ b/xsd/tests/cxx/tree/encoding/wchar/driver.cxx
@@ -1,12 +1,11 @@
// file : tests/cxx/tree/encoding/wchar/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 the wide character mapping.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <fstream>
#include <iostream>
@@ -29,7 +28,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 ());
@@ -47,7 +46,7 @@ main (int argc, char* argv[])
xml_schema::namespace_infomap map;
map[L"t"].name = L"test";
- root (std::cout, *r, map, L"UCS-4LE");
+ root (std::cout, *r, map, L"ASCII");
}
catch (xml_schema::exception const& e)
{
diff --git a/xsd/tests/cxx/tree/encoding/wchar/makefile b/xsd/tests/cxx/tree/encoding/wchar/makefile
index fb2faed..e66d3a5 100644
--- a/xsd/tests/cxx/tree/encoding/wchar/makefile
+++ b/xsd/tests/cxx/tree/encoding/wchar/makefile
@@ -1,6 +1,5 @@
# file : tests/cxx/tree/encoding/wchar/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-serialization --generate-doxygen \
+$(gen): xsd_options += --generate-serialization --generate-doxygen \
--char-type wchar_t
$(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/encoding/wchar/test.std b/xsd/tests/cxx/tree/encoding/wchar/test.std
index 93d4561..815ba6c 100644
--- a/xsd/tests/cxx/tree/encoding/wchar/test.std
+++ b/xsd/tests/cxx/tree/encoding/wchar/test.std
Binary files differ