aboutsummaryrefslogtreecommitdiff
path: root/tests/cli/lib/libtest
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-25 13:41:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-25 13:41:19 +0200
commit95239b7c5404965d4f5ef997b5b75bf542a25192 (patch)
tree1b4fc6229723babffa7c5d56ee0c2eae24215535 /tests/cli/lib/libtest
parentf56b5a42b9aaaeb0c4e7dee894dea9686599b88c (diff)
Part one of dependency injection with auto-generation support
Diffstat (limited to 'tests/cli/lib/libtest')
-rw-r--r--tests/cli/lib/libtest/build/bootstrap.build2
-rw-r--r--tests/cli/lib/libtest/build/export.build6
-rw-r--r--tests/cli/lib/libtest/build/root.build7
-rw-r--r--tests/cli/lib/libtest/buildfile2
-rw-r--r--tests/cli/lib/libtest/test/buildfile13
-rw-r--r--tests/cli/lib/libtest/test/extra/test.cli11
-rw-r--r--tests/cli/lib/libtest/test/test.cli8
-rw-r--r--tests/cli/lib/libtest/test/utility.cpp6
8 files changed, 55 insertions, 0 deletions
diff --git a/tests/cli/lib/libtest/build/bootstrap.build b/tests/cli/lib/libtest/build/bootstrap.build
new file mode 100644
index 0000000..67a5f1a
--- /dev/null
+++ b/tests/cli/lib/libtest/build/bootstrap.build
@@ -0,0 +1,2 @@
+project = cli-lib-libtest
+using config
diff --git a/tests/cli/lib/libtest/build/export.build b/tests/cli/lib/libtest/build/export.build
new file mode 100644
index 0000000..e8b12b3
--- /dev/null
+++ b/tests/cli/lib/libtest/build/export.build
@@ -0,0 +1,6 @@
+$out_root/:
+{
+ include test/
+}
+
+export $out_root/test/lib{test}
diff --git a/tests/cli/lib/libtest/build/root.build b/tests/cli/lib/libtest/build/root.build
new file mode 100644
index 0000000..f2f5ca6
--- /dev/null
+++ b/tests/cli/lib/libtest/build/root.build
@@ -0,0 +1,7 @@
+using cxx
+
+hxx.ext =
+ixx.ext = ipp
+cxx.ext = cpp
+
+using cli
diff --git a/tests/cli/lib/libtest/buildfile b/tests/cli/lib/libtest/buildfile
new file mode 100644
index 0000000..d00a137
--- /dev/null
+++ b/tests/cli/lib/libtest/buildfile
@@ -0,0 +1,2 @@
+.: test/
+include test/
diff --git a/tests/cli/lib/libtest/test/buildfile b/tests/cli/lib/libtest/test/buildfile
new file mode 100644
index 0000000..5325f14
--- /dev/null
+++ b/tests/cli/lib/libtest/test/buildfile
@@ -0,0 +1,13 @@
+lib{test}: cxx{utility} cxx{test} extra/cxx{test}
+cxx{test} hxx{test}: cli{test}
+
+extra/:
+{
+ cxx{test} hxx{test}: cli{test}
+ cli.options += --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
diff --git a/tests/cli/lib/libtest/test/extra/test.cli b/tests/cli/lib/libtest/test/extra/test.cli
new file mode 100644
index 0000000..8408402
--- /dev/null
+++ b/tests/cli/lib/libtest/test/extra/test.cli
@@ -0,0 +1,11 @@
+namespace test
+{
+ namespace extra
+ {
+ class options
+ {
+ bool --help;
+ bool --version;
+ };
+ }
+}
diff --git a/tests/cli/lib/libtest/test/test.cli b/tests/cli/lib/libtest/test/test.cli
new file mode 100644
index 0000000..8bc51e8
--- /dev/null
+++ b/tests/cli/lib/libtest/test/test.cli
@@ -0,0 +1,8 @@
+namespace test
+{
+ class options
+ {
+ bool --help;
+ bool --version;
+ };
+}
diff --git a/tests/cli/lib/libtest/test/utility.cpp b/tests/cli/lib/libtest/test/utility.cpp
new file mode 100644
index 0000000..7c59218
--- /dev/null
+++ b/tests/cli/lib/libtest/test/utility.cpp
@@ -0,0 +1,6 @@
+#include <test/test>
+
+void
+f ()
+{
+}