diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.gitignore | 1 | ||||
-rw-r--r-- | tests/build/.gitignore | 1 | ||||
-rw-r--r-- | tests/build/bootstrap.build | 5 | ||||
-rw-r--r-- | tests/build/root.build | 10 | ||||
-rw-r--r-- | tests/buildfile | 3 | ||||
-rw-r--r-- | tests/test/buildfile | 4 | ||||
-rw-r--r-- | tests/test/driver.cxx | 11 | ||||
-rw-r--r-- | tests/test/test.out | 1 |
8 files changed, 36 insertions, 0 deletions
diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..e54525b --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1 @@ +driver diff --git a/tests/build/.gitignore b/tests/build/.gitignore new file mode 100644 index 0000000..225c27f --- /dev/null +++ b/tests/build/.gitignore @@ -0,0 +1 @@ +config.build diff --git a/tests/build/bootstrap.build b/tests/build/bootstrap.build new file mode 100644 index 0000000..2c2de24 --- /dev/null +++ b/tests/build/bootstrap.build @@ -0,0 +1,5 @@ +project = # Unnamed subproject. + +using config +using dist +using test diff --git a/tests/build/root.build b/tests/build/root.build new file mode 100644 index 0000000..672eda8 --- /dev/null +++ b/tests/build/root.build @@ -0,0 +1,10 @@ +using cxx + +hxx{*}: extension = +cxx{*}: extension = cxx + +cxx.std = 11 + +# Every exe{} in this subproject is by default a test. +# +test.exe = true diff --git a/tests/buildfile b/tests/buildfile new file mode 100644 index 0000000..4dcbe2a --- /dev/null +++ b/tests/buildfile @@ -0,0 +1,3 @@ +d = test/ +./: $d +include $d diff --git a/tests/test/buildfile b/tests/test/buildfile new file mode 100644 index 0000000..a46969d --- /dev/null +++ b/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/tests/test/driver.cxx b/tests/test/driver.cxx new file mode 100644 index 0000000..59bfb2d --- /dev/null +++ b/tests/test/driver.cxx @@ -0,0 +1,11 @@ +// file: tests/test/driver.cxx -*- C++ -*- + +#include <hello/hello> + +int +main () +{ + using hello::say; + + say ("World"); +} diff --git a/tests/test/test.out b/tests/test/test.out new file mode 100644 index 0000000..8ab686e --- /dev/null +++ b/tests/test/test.out @@ -0,0 +1 @@ +Hello, World! |