summaryrefslogtreecommitdiff
path: root/libhello/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-06-19 18:30:13 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-06-19 18:30:13 +0300
commitf089a1a2321e77bfb5f60c2cd79dac14eac9bf63 (patch)
treedb3f4b2f2a98ac2701628c7d9ad739060f427bca /libhello/tests
parent6351ae4cadc085666ffda1931a1b05fc4a89e0e5 (diff)
Move project into intermediate sub-directory
Diffstat (limited to 'libhello/tests')
-rw-r--r--libhello/tests/.gitignore1
-rw-r--r--libhello/tests/build/.gitignore1
-rw-r--r--libhello/tests/build/bootstrap.build5
-rw-r--r--libhello/tests/build/root.build14
-rw-r--r--libhello/tests/buildfile1
-rw-r--r--libhello/tests/test/buildfile4
-rw-r--r--libhello/tests/test/driver.cxx11
-rw-r--r--libhello/tests/test/test.out1
8 files changed, 38 insertions, 0 deletions
diff --git a/libhello/tests/.gitignore b/libhello/tests/.gitignore
new file mode 100644
index 0000000..e54525b
--- /dev/null
+++ b/libhello/tests/.gitignore
@@ -0,0 +1 @@
+driver
diff --git a/libhello/tests/build/.gitignore b/libhello/tests/build/.gitignore
new file mode 100644
index 0000000..225c27f
--- /dev/null
+++ b/libhello/tests/build/.gitignore
@@ -0,0 +1 @@
+config.build
diff --git a/libhello/tests/build/bootstrap.build b/libhello/tests/build/bootstrap.build
new file mode 100644
index 0000000..2c2de24
--- /dev/null
+++ b/libhello/tests/build/bootstrap.build
@@ -0,0 +1,5 @@
+project = # Unnamed subproject.
+
+using config
+using dist
+using test
diff --git a/libhello/tests/build/root.build b/libhello/tests/build/root.build
new file mode 100644
index 0000000..a2ee38a
--- /dev/null
+++ b/libhello/tests/build/root.build
@@ -0,0 +1,14 @@
+cxx.std = 11
+
+using cxx
+
+hxx{*}: extension = hxx
+cxx{*}: extension = cxx
+
+# Every exe{} in this subproject is by default a test.
+#
+exe{*}: test = true
+
+# Specify the test target for cross-testing.
+#
+test.target = $cxx.target
diff --git a/libhello/tests/buildfile b/libhello/tests/buildfile
new file mode 100644
index 0000000..1a8bcc9
--- /dev/null
+++ b/libhello/tests/buildfile
@@ -0,0 +1 @@
+./: test/
diff --git a/libhello/tests/test/buildfile b/libhello/tests/test/buildfile
new file mode 100644
index 0000000..a46969d
--- /dev/null
+++ b/libhello/tests/test/buildfile
@@ -0,0 +1,4 @@
+import libs = libhello%lib{hello}
+
+exe{driver}: cxx{driver} $libs
+exe{driver}: test.output = test.out
diff --git a/libhello/tests/test/driver.cxx b/libhello/tests/test/driver.cxx
new file mode 100644
index 0000000..38937f0
--- /dev/null
+++ b/libhello/tests/test/driver.cxx
@@ -0,0 +1,11 @@
+// file: tests/test/driver.cxx -*- C++ -*-
+
+#include <libhello/hello.hxx>
+
+int
+main ()
+{
+ using hello::say;
+
+ say ("World");
+}
diff --git a/libhello/tests/test/test.out b/libhello/tests/test/test.out
new file mode 100644
index 0000000..8ab686e
--- /dev/null
+++ b/libhello/tests/test/test.out
@@ -0,0 +1 @@
+Hello, World!