From 8728018f93a73b08a68ab1cea502a5f6b4a2a79e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 May 2018 15:35:08 +0200 Subject: Regenerate libformat using bdep-new --- libformat/tests/.gitignore | 7 +++++++ libformat/tests/basics/buildfile | 3 +++ libformat/tests/basics/driver.cxx | 14 ++++++++++++++ libformat/tests/build/.gitignore | 2 ++ libformat/tests/build/bootstrap.build | 4 ++-- libformat/tests/build/root.build | 6 ++++-- libformat/tests/buildfile | 2 +- libformat/tests/test/buildfile | 4 ---- libformat/tests/test/driver.cxx | 16 ---------------- libformat/tests/test/test.out | 3 --- 10 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 libformat/tests/basics/buildfile create mode 100644 libformat/tests/basics/driver.cxx delete mode 100644 libformat/tests/test/buildfile delete mode 100644 libformat/tests/test/driver.cxx delete mode 100644 libformat/tests/test/test.out (limited to 'libformat/tests') diff --git a/libformat/tests/.gitignore b/libformat/tests/.gitignore index e54525b..662178d 100644 --- a/libformat/tests/.gitignore +++ b/libformat/tests/.gitignore @@ -1 +1,8 @@ +# Test executables. +# driver + +# Testscript output directories (can be symlinks). +# +test +test-* diff --git a/libformat/tests/basics/buildfile b/libformat/tests/basics/buildfile new file mode 100644 index 0000000..813cb7e --- /dev/null +++ b/libformat/tests/basics/buildfile @@ -0,0 +1,3 @@ +import libs = libformat%lib{format} + +exe{driver}: {hxx ixx txx cxx}{*} $libs diff --git a/libformat/tests/basics/driver.cxx b/libformat/tests/basics/driver.cxx new file mode 100644 index 0000000..03faea7 --- /dev/null +++ b/libformat/tests/basics/driver.cxx @@ -0,0 +1,14 @@ +#include + +#include +#include + +using namespace std; +using namespace format; + +int main () +{ + assert (format_hello ("Hello", "World", volume::quiet) == "hello, World!"); + assert (format_hello ("Hello", "World", volume::normal) == "Hello, World!"); + assert (format_hello ("Hello", "World", volume::loud) == "HELLO, World!"); +} diff --git a/libformat/tests/build/.gitignore b/libformat/tests/build/.gitignore index 225c27f..4a730a3 100644 --- a/libformat/tests/build/.gitignore +++ b/libformat/tests/build/.gitignore @@ -1 +1,3 @@ config.build +root/ +bootstrap/ diff --git a/libformat/tests/build/bootstrap.build b/libformat/tests/build/bootstrap.build index 2c2de24..a07b5ea 100644 --- a/libformat/tests/build/bootstrap.build +++ b/libformat/tests/build/bootstrap.build @@ -1,5 +1,5 @@ -project = # Unnamed subproject. +project = # Unnamed tests subproject. using config -using dist using test +using dist diff --git a/libformat/tests/build/root.build b/libformat/tests/build/root.build index a2ee38a..a67b2fe 100644 --- a/libformat/tests/build/root.build +++ b/libformat/tests/build/root.build @@ -1,14 +1,16 @@ -cxx.std = 11 +cxx.std = latest using cxx hxx{*}: extension = hxx +ixx{*}: extension = ixx +txx{*}: extension = txx cxx{*}: extension = cxx # Every exe{} in this subproject is by default a test. # exe{*}: test = true -# Specify the test target for cross-testing. +# The test target for cross-testing (running tests under Wine, etc). # test.target = $cxx.target diff --git a/libformat/tests/buildfile b/libformat/tests/buildfile index 1a8bcc9..aeeab15 100644 --- a/libformat/tests/buildfile +++ b/libformat/tests/buildfile @@ -1 +1 @@ -./: test/ +./: {*/ -build/} diff --git a/libformat/tests/test/buildfile b/libformat/tests/test/buildfile deleted file mode 100644 index e99af23..0000000 --- a/libformat/tests/test/buildfile +++ /dev/null @@ -1,4 +0,0 @@ -import libs = libformat%lib{format} - -exe{driver}: cxx{driver} $libs -exe{driver}: file{test.out}: test.stdout = true diff --git a/libformat/tests/test/driver.cxx b/libformat/tests/test/driver.cxx deleted file mode 100644 index 1cf2959..0000000 --- a/libformat/tests/test/driver.cxx +++ /dev/null @@ -1,16 +0,0 @@ -// file: tests/test/driver.cxx -*- C++ -*- - -#include - -#include - -int -main () -{ - using namespace std; - using namespace format; - - cout << message ("Hello", "World", volume::quiet) << endl; - cout << message ("Hello", "World", volume::normal) << endl; - cout << message ("Hello", "World", volume::loud) << endl; -} diff --git a/libformat/tests/test/test.out b/libformat/tests/test/test.out deleted file mode 100644 index 7ce133b..0000000 --- a/libformat/tests/test/test.out +++ /dev/null @@ -1,3 +0,0 @@ -hello, World! -Hello, World! -HELLO, World! -- cgit v1.1