From 01399cea3ff5d5d64c987d06c882a1c7c9cdd878 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 20 Jul 2017 08:55:37 +0200 Subject: Add modularized version --- libmprint/tests/.gitignore | 1 + libmprint/tests/build/.gitignore | 1 + libmprint/tests/build/bootstrap.build | 5 +++++ libmprint/tests/build/root.build | 13 +++++++++++++ libmprint/tests/buildfile | 1 + libmprint/tests/test/buildfile | 5 +++++ libmprint/tests/test/driver.cxx | 10 ++++++++++ libmprint/tests/test/test.out | 1 + 8 files changed, 37 insertions(+) create mode 100644 libmprint/tests/.gitignore create mode 100644 libmprint/tests/build/.gitignore create mode 100644 libmprint/tests/build/bootstrap.build create mode 100644 libmprint/tests/build/root.build create mode 100644 libmprint/tests/buildfile create mode 100644 libmprint/tests/test/buildfile create mode 100644 libmprint/tests/test/driver.cxx create mode 100644 libmprint/tests/test/test.out (limited to 'libmprint/tests') diff --git a/libmprint/tests/.gitignore b/libmprint/tests/.gitignore new file mode 100644 index 0000000..e54525b --- /dev/null +++ b/libmprint/tests/.gitignore @@ -0,0 +1 @@ +driver diff --git a/libmprint/tests/build/.gitignore b/libmprint/tests/build/.gitignore new file mode 100644 index 0000000..225c27f --- /dev/null +++ b/libmprint/tests/build/.gitignore @@ -0,0 +1 @@ +config.build diff --git a/libmprint/tests/build/bootstrap.build b/libmprint/tests/build/bootstrap.build new file mode 100644 index 0000000..2c2de24 --- /dev/null +++ b/libmprint/tests/build/bootstrap.build @@ -0,0 +1,5 @@ +project = # Unnamed subproject. + +using config +using dist +using test diff --git a/libmprint/tests/build/root.build b/libmprint/tests/build/root.build new file mode 100644 index 0000000..58dffed --- /dev/null +++ b/libmprint/tests/build/root.build @@ -0,0 +1,13 @@ +cxx.std = experimental + +using cxx + +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/libmprint/tests/buildfile b/libmprint/tests/buildfile new file mode 100644 index 0000000..1a8bcc9 --- /dev/null +++ b/libmprint/tests/buildfile @@ -0,0 +1 @@ +./: test/ diff --git a/libmprint/tests/test/buildfile b/libmprint/tests/test/buildfile new file mode 100644 index 0000000..0fe3fea --- /dev/null +++ b/libmprint/tests/test/buildfile @@ -0,0 +1,5 @@ +import libs = libmprint%lib{mprint} +import libs += libstd-modules%liba{std-modules} + +exe{driver}: cxx{driver} $libs +exe{driver}: test.output = test.out diff --git a/libmprint/tests/test/driver.cxx b/libmprint/tests/test/driver.cxx new file mode 100644 index 0000000..32fa1ae --- /dev/null +++ b/libmprint/tests/test/driver.cxx @@ -0,0 +1,10 @@ +// file: tests/test/driver.cxx -*- C++ -*- + +import std.core; +import print; + +int +main () +{ + print::to_stdout ("Hello, World!"); +} diff --git a/libmprint/tests/test/test.out b/libmprint/tests/test/test.out new file mode 100644 index 0000000..8ab686e --- /dev/null +++ b/libmprint/tests/test/test.out @@ -0,0 +1 @@ +Hello, World! -- cgit v1.1