summaryrefslogtreecommitdiff
path: root/tests/inheritance
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-04-08 14:51:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-04-27 11:38:53 +0300
commit720c5a33b6a49cf328fdd7611f49153cf8f60247 (patch)
tree9725f3d1f42ec90fde84520f49647edea013ce5e /tests/inheritance
parent3183f3bb927a90783ae0aeaf190a0919377aabe4 (diff)
Separate tests and examples into individual packages
Also make cli module to be explicitly enabled via the config.cli configuration variable.
Diffstat (limited to 'tests/inheritance')
-rw-r--r--tests/inheritance/buildfile11
-rw-r--r--tests/inheritance/driver.cxx35
-rw-r--r--tests/inheritance/test.cli25
-rw-r--r--tests/inheritance/test.std4
4 files changed, 0 insertions, 75 deletions
diff --git a/tests/inheritance/buildfile b/tests/inheritance/buildfile
deleted file mode 100644
index f1b72ce..0000000
--- a/tests/inheritance/buildfile
+++ /dev/null
@@ -1,11 +0,0 @@
-# file : tests/inheritance/buildfile
-# license : MIT; see accompanying LICENSE file
-
-exe{driver}: {hxx cxx}{* -test} cli.cxx{test}
-exe{driver}: file{test.std}: test.stdout = true
-exe{driver}: test.arguments = --very-long-flag -s short -i 123 --string long
-
-cxx.poptions =+ "-I$out_base"
-
-cli.cxx{test}: cli{test}
-cli.options = --generate-description --option-length 17
diff --git a/tests/inheritance/driver.cxx b/tests/inheritance/driver.cxx
deleted file mode 100644
index 5ecb019..0000000
--- a/tests/inheritance/driver.cxx
+++ /dev/null
@@ -1,35 +0,0 @@
-// file : tests/inheritance/driver.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// license : MIT; see accompanying LICENSE file
-
-// Test option class inheritance.
-//
-
-#include <string>
-#include <cassert>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- const cli::options& d (options::description ());
-
- assert (d.size () == 4);
- assert (d[0].name () == "--very-long-flag");
- assert (d[1].name () == "-i");
- assert (d[2].name () == "-s");
- assert (d[3].name () == "--string");
-
- options o (argc, argv);
-
- assert (o.very_long_flag ());
- assert (o.s () == "short");
- assert (o.i () == 123);
- assert (o.string () == "long");
-
- options::print_usage (cout);
-}
diff --git a/tests/inheritance/test.cli b/tests/inheritance/test.cli
deleted file mode 100644
index 9e43bb5..0000000
--- a/tests/inheritance/test.cli
+++ /dev/null
@@ -1,25 +0,0 @@
-// file : tests/inheritance/test.cli
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// license : MIT; see accompanying LICENSE file
-
-include <string>;
-
-class base1 = 0
-{
- bool --very-long-flag {"Long flag."};
-};
-
-class base2
-{
- std::string -s {"<str>", "Short string."};
-};
-
-class interm: base1
-{
- int -i = 1 {"<num>", "Integer."};
-};
-
-class options: interm, base2
-{
- std::string --string {"<str>", "Long string."};
-};
diff --git a/tests/inheritance/test.std b/tests/inheritance/test.std
deleted file mode 100644
index 4c93225..0000000
--- a/tests/inheritance/test.std
+++ /dev/null
@@ -1,4 +0,0 @@
---very-long-flag Long flag.
--i <num> Integer.
--s <str> Short string.
---string <str> Long string.