From 5e527213a2430bb3018e5eebd909aef294edf9b5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- tests/cxx/tree/complex/ctor/driver.cxx | 122 ---------------------- tests/cxx/tree/complex/ctor/makefile | 86 ---------------- tests/cxx/tree/complex/ctor/test.xsd | 182 --------------------------------- tests/cxx/tree/complex/makefile | 16 --- 4 files changed, 406 deletions(-) delete mode 100644 tests/cxx/tree/complex/ctor/driver.cxx delete mode 100644 tests/cxx/tree/complex/ctor/makefile delete mode 100644 tests/cxx/tree/complex/ctor/test.xsd delete mode 100644 tests/cxx/tree/complex/makefile (limited to 'tests/cxx/tree/complex') diff --git a/tests/cxx/tree/complex/ctor/driver.cxx b/tests/cxx/tree/complex/ctor/driver.cxx deleted file mode 100644 index 0d691ac..0000000 --- a/tests/cxx/tree/complex/ctor/driver.cxx +++ /dev/null @@ -1,122 +0,0 @@ -// file : tests/cxx/tree/complex/ctor/driver.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -// Test generation of varous complex type constructors. -// - -#include -#include - -#include "test.hxx" - -#ifdef XSD_CXX11 -# include // std::move -# define XSD_MOVE(x) std::move(x) -#else -# define XSD_MOVE(x) x -#endif - -using namespace std; -using namespace test; - -int -main () -{ - // Test case A. - // - { - a_base b1; - a_base b2 ("abc"); // empty ultimate base + required - a_base b3 ("abc", "foo"); // ultimate base + required - - a_derived a1; - a_derived a2 ("foo", "bar"); // empty ultimate base + required - a_derived a3 (b3, "bar"); // base + required - a_derived a4 ("abc", "foo", "bar"); // ultimate base + required - } - - // Test case B. - // - { - b_simple s ("base"); - b_base b ("base", "foo"); - b_derived d ("base", "foo", "bar"); - b_type t ("base"); - } - - // Test case C. - // - { - c_simple s (c_enum::a); - c_base b (c_enum::a, "foo"); - c_derived d (c_enum::a, "foo", "bar"); - c_type t (c_enum::a); - } - - // Test case D. - // - { - d_simple s (1); - d_base b (1, "foo"); - d_derived d (1, "foo", "bar"); - d_type t (1); - } - - // Test case E. - // - { - // e_base - // - e_base b1 (1, "foo", e_complex_type ("bar")); - - XSD_AUTO_PTR c2 (new e_complex_type ("bar")); - e_base b2 (1, "foo", XSD_MOVE (c2)); - - XSD_AUTO_PTR s3 (new e_simple_type ("foo")); - XSD_AUTO_PTR c3 (new e_complex_type ("bar")); - e_base b3 (1, XSD_MOVE (s3), XSD_MOVE (c3)); - - assert (b1 == b2); - assert (b1 == b3); - - // e_derived - // - e_derived d1 (1, "foo", e_complex_type ("bar"), - true, "baz", e_complex_type ("biz")); - - XSD_AUTO_PTR c2a (new e_complex_type ("bar")); - XSD_AUTO_PTR c2b (new e_complex_type ("biz")); - e_derived d2 (1, "foo", XSD_MOVE (c2a), true, "baz", XSD_MOVE (c2b)); - - XSD_AUTO_PTR s3a (new e_simple_type ("foo")); - XSD_AUTO_PTR s3b (new xml_schema::string ("baz")); - XSD_AUTO_PTR c3a (new e_complex_type ("bar")); - XSD_AUTO_PTR c3b (new e_complex_type ("biz")); - e_derived d3 (1, - XSD_MOVE (s3a), - XSD_MOVE (c3a), - true, - XSD_MOVE (s3b), - XSD_MOVE (c3b)); - - assert (d1 == d2); - assert (d1 == d3); - - } - - // Test case F. - // - { - f_type f1 (xml_schema::type (), 1, "foo", f_complex_type ("bar")); - - XSD_AUTO_PTR c2 (new f_complex_type ("bar")); - f_type f2 (1, "foo", XSD_MOVE (c2)); - - XSD_AUTO_PTR s3 (new f_simple_type ("foo")); - XSD_AUTO_PTR c3 (new f_complex_type ("bar")); - f_type f3 (1, XSD_MOVE (s3), XSD_MOVE (c3)); - - assert (f1 == f2); - assert (f1 == f3); - } -} diff --git a/tests/cxx/tree/complex/ctor/makefile b/tests/cxx/tree/complex/ctor/makefile deleted file mode 100644 index db592ff..0000000 --- a/tests/cxx/tree/complex/ctor/makefile +++ /dev/null @@ -1,86 +0,0 @@ -# file : tests/cxx/tree/complex/ctor/makefile -# license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make - -xsd := test.xsd -cxx := driver.cxx - -obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o)) -dep := $(obj:.o=.o.d) - -driver := $(out_base)/driver -test := $(out_base)/.test -clean := $(out_base)/.clean - - -# Import. -# -$(call import,\ - $(scf_root)/import/libxerces-c/stub.make,\ - l: xerces_c.l,cpp-options: xerces_c.l.cpp-options) - - -# Build. -# -$(driver): $(obj) $(xerces_c.l) - -$(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-default-ctor --generate-from-base-ctor \ ---generate-doxygen --generate-polymorphic --polymorphic-type-all \ ---generate-comparison -$(gen): $(out_root)/xsd/xsd - -$(call include-dep,$(dep),$(obj),$(gen)) - -# Convenience alias for default target. -# -$(out_base)/: $(driver) - - -# Test. -# -$(test): driver := $(driver) -$(test): $(driver) - $(call message,test $$1,$$1,$(driver)) - -# Clean. -# -$(clean): $(driver).o.clean \ - $(addsuffix .cxx.clean,$(obj)) \ - $(addsuffix .cxx.clean,$(dep)) \ - $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean)) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(gen): | $(out_base)/.gitignore -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(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. -# -$(call import,$(src_root)/xsd/makefile) diff --git a/tests/cxx/tree/complex/ctor/test.xsd b/tests/cxx/tree/complex/ctor/test.xsd deleted file mode 100644 index b8dd95e..0000000 --- a/tests/cxx/tree/complex/ctor/test.xsd +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/cxx/tree/complex/makefile b/tests/cxx/tree/complex/makefile deleted file mode 100644 index 95ff3f6..0000000 --- a/tests/cxx/tree/complex/makefile +++ /dev/null @@ -1,16 +0,0 @@ -# file : tests/cxx/tree/complex/makefile -# license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make - -tests := ctor - -default := $(out_base)/ -test := $(out_base)/.test -clean := $(out_base)/.clean - -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests))) -$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests))) - -$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile)) -- cgit v1.1