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/parser/polymorphism/recursive/driver.cxx | 68 ---------- tests/cxx/parser/polymorphism/recursive/makefile | 83 ------------ tests/cxx/parser/polymorphism/recursive/output | 22 --- .../parser/polymorphism/recursive/test-pimpl.cxx | 147 --------------------- .../parser/polymorphism/recursive/test-pimpl.hxx | 94 ------------- tests/cxx/parser/polymorphism/recursive/test.xml | 15 --- tests/cxx/parser/polymorphism/recursive/test.xsd | 53 -------- 7 files changed, 482 deletions(-) delete mode 100644 tests/cxx/parser/polymorphism/recursive/driver.cxx delete mode 100644 tests/cxx/parser/polymorphism/recursive/makefile delete mode 100644 tests/cxx/parser/polymorphism/recursive/output delete mode 100644 tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx delete mode 100644 tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx delete mode 100644 tests/cxx/parser/polymorphism/recursive/test.xml delete mode 100644 tests/cxx/parser/polymorphism/recursive/test.xsd (limited to 'tests/cxx/parser/polymorphism/recursive') diff --git a/tests/cxx/parser/polymorphism/recursive/driver.cxx b/tests/cxx/parser/polymorphism/recursive/driver.cxx deleted file mode 100644 index 4a401bd..0000000 --- a/tests/cxx/parser/polymorphism/recursive/driver.cxx +++ /dev/null @@ -1,68 +0,0 @@ -// file : tests/cxx/parser/polymorphism/recursive/driver.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -// Test polymorphic recursive parsing. -// - -#include -#include - -#include "test-pskel.hxx" -#include "test-pimpl.hxx" - -using namespace std; -using namespace test; - -int -main (int argc, char* argv[]) -{ - if (argc != 2) - { - cerr << "usage: " << argv[0] << " test.xml" << endl; - return 1; - } - - try - { - xml_schema::int_pimpl int_p; - - root_pimpl root_p; - expression_pimpl expression_p; - recursive_pimpl recursive_p; - value_a_pimpl value_a_p; - value_b_pimpl value_b_p; - - xml_schema::parser_map_impl expression_map; - - // Connect the parsers together. - // - root_p.parsers (expression_p); - expression_map.insert(value_a_p); - expression_map.insert(value_b_p); - expression_map.insert(recursive_p); - - root_p.expression_parser(expression_map); - - recursive_p.parsers(expression_p); - recursive_p.expression_parser(expression_map); - - value_a_p.parsers(int_p); - value_b_p.parsers(int_p); - - xml_schema::document doc_p (root_p, "test", "root", true); - - root_p.pre (); - doc_p.parse (argv[1]); - root_p.post_root (); - } - catch (xml_schema::exception const& e) - { - cerr << e << endl; - return 1; - } - catch (std::ios_base::failure const&) - { - cerr << "io failure" << endl; - return 1; - } -} diff --git a/tests/cxx/parser/polymorphism/recursive/makefile b/tests/cxx/parser/polymorphism/recursive/makefile deleted file mode 100644 index 855d471..0000000 --- a/tests/cxx/parser/polymorphism/recursive/makefile +++ /dev/null @@ -1,83 +0,0 @@ -# file : tests/cxx/parser/polymorphism/recursive/makefile -# license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make - -xsd := test.xsd -cxx := driver.cxx test-pimpl.cxx - -obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.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=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options += --generate-polymorphic -$(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) $(src_base)/test.xml $(src_base)/output - $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver)) - -# Clean. -# -$(clean): $(driver).o.clean \ - $(addsuffix .cxx.clean,$(obj)) \ - $(addsuffix .cxx.clean,$(dep)) \ - $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.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/parser/xsd-cxx.make) -endif - - -# Dependencies. -# -$(call import,$(src_root)/xsd/makefile) diff --git a/tests/cxx/parser/polymorphism/recursive/output b/tests/cxx/parser/polymorphism/recursive/output deleted file mode 100644 index 28a835f..0000000 --- a/tests/cxx/parser/polymorphism/recursive/output +++ /dev/null @@ -1,22 +0,0 @@ -root start -recursive start -value_a begin -value->constant -value: post_expression override -value_a: post_value override -value_a end -recursive->expression event -recursive start -value_b begin -value->constant -value: post_expression override -value_b: post_value override -value_b end -recursive->expression event -recursive: post_expression override -recursive end -recursive->expression event -recursive: post_expression override -recursive end -root->expression -root end diff --git a/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx b/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx deleted file mode 100644 index 8c355ea..0000000 --- a/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx +++ /dev/null @@ -1,147 +0,0 @@ -// file : tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -#include "test-pimpl.hxx" - -using namespace std; - -namespace test -{ - // root_pimpl - // - - void root_pimpl:: - pre () - { - cout << "root start" << endl; - } - - void root_pimpl:: - expression () - { - cout << "root->expression" << endl; - } - - void root_pimpl:: - post_root () - { - cout << "root end" << endl; - } - - // expression_pimpl - // - - void expression_pimpl:: - pre () - { - cout << "expression begin" << endl; - } - - void expression_pimpl:: - post_expression () - { - cout << "expression end" << endl; - } - - // recursive_pimpl - // - - void recursive_pimpl:: - pre () - { - cout << "recursive start" << endl; - } - - void recursive_pimpl:: - expression () - { - cout << "recursive->expression event" << endl; - } - - void recursive_pimpl:: - post_expression () - { - cout << "recursive: post_expression override" << endl; - post_recursive (); - } - - void recursive_pimpl:: - post_recursive () - { - cout << "recursive end" << endl; - } - - // value_pimpl - // - - void value_pimpl:: - pre () - { - cout << "value begin" << endl; - } - - void value_pimpl:: - constant (int) - { - cout << "value->constant" << endl; - } - - void value_pimpl:: - post_expression () - { - cout << "value: post_expression override" << endl; - post_value (); - } - - void value_pimpl:: - post_value () - { - cout << "value end" << endl; - } - - // value_a_pimpl - // - - void value_a_pimpl:: - pre () - { - cout << "value_a begin" << endl; - } - - void value_a_pimpl:: - post_value () - { - cout << "value_a: post_value override" << endl; - post_value_a (); - } - - void value_a_pimpl:: - post_value_a () - { - cout << "value_a end" << endl; - } - - // value_b_pimpl - // - - void value_b_pimpl:: - pre () - { - cout << "value_b begin" << endl; - } - - void value_b_pimpl:: - post_value () - { - cout << "value_b: post_value override" << endl; - post_value_b (); - } - - void value_b_pimpl:: - post_value_b () - { - cout << "value_b end" << endl; - } -} diff --git a/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx b/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx deleted file mode 100644 index 932be9e..0000000 --- a/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx +++ /dev/null @@ -1,94 +0,0 @@ -// file : tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef TEST_PIMPL_HXX -#define TEST_PIMPL_HXX - -#include "test-pskel.hxx" - -namespace test -{ - class root_pimpl: public virtual root_pskel - { - public: - virtual void - pre (); - - virtual void - expression (); - - virtual void - post_root (); - }; - - class expression_pimpl: public virtual expression_pskel - { - public: - virtual void - pre (); - - virtual void - post_expression (); - }; - - class recursive_pimpl: public virtual recursive_pskel, - public expression_pimpl - { - public: - virtual void - pre (); - - virtual void - expression (); - - virtual void - post_expression (); - - virtual void - post_recursive (); - }; - - class value_pimpl: public virtual value_pskel, public expression_pimpl - { - public: - virtual void - pre (); - - virtual void - constant (int); - - virtual void - post_expression (); - - virtual void - post_value (); - }; - - class value_a_pimpl: public virtual value_a_pskel, public value_pimpl - { - public: - virtual void - pre (); - - virtual void - post_value (); - - virtual void - post_value_a (); - }; - - class value_b_pimpl: public virtual value_b_pskel, public value_pimpl - { - public: - virtual void - pre (); - - virtual void - post_value (); - - virtual void - post_value_b (); - }; -} - -#endif // TEST_PIMPL_HXX diff --git a/tests/cxx/parser/polymorphism/recursive/test.xml b/tests/cxx/parser/polymorphism/recursive/test.xml deleted file mode 100644 index 42035ba..0000000 --- a/tests/cxx/parser/polymorphism/recursive/test.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - 1 - - - - 2 - - - - diff --git a/tests/cxx/parser/polymorphism/recursive/test.xsd b/tests/cxx/parser/polymorphism/recursive/test.xsd deleted file mode 100644 index affcc8a..0000000 --- a/tests/cxx/parser/polymorphism/recursive/test.xsd +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.1