aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-26 17:25:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-26 17:25:10 +0200
commit18568ff0ff3dce89d694b494c5dfc9a32e63c9e6 (patch)
treecd36895fdab3b30b8b61fcc3e12f8a92bb292203 /tests
parent95239b7c5404965d4f5ef997b5b75bf542a25192 (diff)
Part two of dependency injection with auto-generation support
Diffstat (limited to 'tests')
-rw-r--r--tests/cli/lib/libtest/test/base.cli7
-rw-r--r--tests/cli/lib/libtest/test/buildfile11
-rw-r--r--tests/cli/lib/libtest/test/test.cli5
3 files changed, 18 insertions, 5 deletions
diff --git a/tests/cli/lib/libtest/test/base.cli b/tests/cli/lib/libtest/test/base.cli
new file mode 100644
index 0000000..bbf9999
--- /dev/null
+++ b/tests/cli/lib/libtest/test/base.cli
@@ -0,0 +1,7 @@
+namespace test
+{
+ class base
+ {
+ bool --version;
+ };
+}
diff --git a/tests/cli/lib/libtest/test/buildfile b/tests/cli/lib/libtest/test/buildfile
index 5325f14..61841e7 100644
--- a/tests/cli/lib/libtest/test/buildfile
+++ b/tests/cli/lib/libtest/test/buildfile
@@ -1,13 +1,18 @@
-lib{test}: cxx{utility} cxx{test} extra/cxx{test}
+lib{test}: cxx{utility} cxx{test base} extra/cxx{test}
cxx{test} hxx{test}: cli{test}
+cxx{base} hxx{base}: cli{base}
+
+cli.options += -I $src_root --include-with-brackets
extra/:
{
cxx{test} hxx{test}: cli{test}
- cli.options += --cli-namespace test::extra::cli
+ cli.options += --include-prefix test/extra --guard-prefix TEST_EXTRA \
+ --cli-namespace test::extra::cli
}
cxx.poptions += -I$out_root -I$src_root
lib{test}: cxx.export.poptions = -I$out_root -I$src_root
-cli.options += --cli-namespace test::cli
+cli.options += --include-prefix test --guard-prefix TEST \
+--cli-namespace test::cli
diff --git a/tests/cli/lib/libtest/test/test.cli b/tests/cli/lib/libtest/test/test.cli
index 8bc51e8..f19d56c 100644
--- a/tests/cli/lib/libtest/test/test.cli
+++ b/tests/cli/lib/libtest/test/test.cli
@@ -1,8 +1,9 @@
+include <test/base.cli>;
+
namespace test
{
- class options
+ class options: base
{
bool --help;
- bool --version;
};
}