From 720c5a33b6a49cf328fdd7611f49153cf8f60247 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 8 Apr 2020 14:51:57 +0300 Subject: Separate tests and examples into individual packages Also make cli module to be explicitly enabled via the config.cli configuration variable. --- tests/merge/buildfile | 9 --------- tests/merge/driver.cxx | 55 -------------------------------------------------- tests/merge/test.cli | 18 ----------------- 3 files changed, 82 deletions(-) delete mode 100644 tests/merge/buildfile delete mode 100644 tests/merge/driver.cxx delete mode 100644 tests/merge/test.cli (limited to 'tests/merge') diff --git a/tests/merge/buildfile b/tests/merge/buildfile deleted file mode 100644 index d786ad8..0000000 --- a/tests/merge/buildfile +++ /dev/null @@ -1,9 +0,0 @@ -# file : tests/merge/buildfile -# license : MIT; see accompanying LICENSE file - -exe{driver}: {hxx cxx}{* -test} cli.cxx{test} - -cxx.poptions =+ "-I$out_base" - -cli.cxx{test}: cli{test} -cli.options = --generate-merge diff --git a/tests/merge/driver.cxx b/tests/merge/driver.cxx deleted file mode 100644 index 0420442..0000000 --- a/tests/merge/driver.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// file : tests/merge/driver.cxx -// author : Boris Kolpackov -// license : MIT; see accompanying LICENSE file - -// Test parsed options merging. -// - -#include -#include - -#include "test.hxx" - -using namespace std; - -template -static T -merge (const char* (&av1)[N1], const char* (&av2)[N2]) -{ - int ac1 (N1); - int ac2 (N2); - T o1 (ac1, const_cast (av1)); - T o2 (ac2, const_cast (av2)); - o1.merge (o2); - return o1; -} - -int -main () -{ - // Basics. - // - { - const char* a1[] = {"", "-i=123", "-v=1", "-v=2"}; - const char* a2[] = {"", "-b", "-i=456", "-s=xyz", "-v=3", "-v=4"}; - derived r (merge (a1, a2)); - - assert (r.b ()); - assert (r.i_specified () && r.i () == 456); - assert (r.s_specified () && r.s () == "xyz"); - assert (r.v_specified () && r.v ().size () == 4 && - r.v ()[0] == 1 && - r.v ()[1] == 2 && - r.v ()[2] == 3 && - r.v ()[3] == 4); - } - - // Default value does not override. - // - { - const char* a1[] = {"", "-i=456"}; - const char* a2[] = {"" }; - derived r (merge (a1, a2)); - assert (r.i_specified () && r.i () == 456); - } -} diff --git a/tests/merge/test.cli b/tests/merge/test.cli deleted file mode 100644 index 4c61f6a..0000000 --- a/tests/merge/test.cli +++ /dev/null @@ -1,18 +0,0 @@ -// file : tests/merge/test.cli -// author : Boris Kolpackov -// license : MIT; see accompanying LICENSE file - -include ; -include ; - -class base -{ - bool -b; - int -i = -1; - std::string -s; -}; - -class derived: base -{ - std::vector -v; -}; -- cgit v1.1