From a0f96b95900108705261881b164d779e2db5b824 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 19 Jul 2017 17:50:36 +0200 Subject: Initial implementation --- tests/.gitignore | 1 + tests/build/.gitignore | 1 + tests/build/bootstrap.build | 9 +++++++++ tests/build/root.build | 17 +++++++++++++++++ tests/buildfile | 8 ++++++++ tests/driver.cxx | 14 ++++++++++++++ tests/test.out | 1 + 7 files changed, 51 insertions(+) create mode 100644 tests/.gitignore create mode 100644 tests/build/.gitignore create mode 100644 tests/build/bootstrap.build create mode 100644 tests/build/root.build create mode 100644 tests/buildfile create mode 100644 tests/driver.cxx create mode 100644 tests/test.out (limited to 'tests') 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..355a05a --- /dev/null +++ b/tests/build/bootstrap.build @@ -0,0 +1,9 @@ +# file : tests/build/bootstrap.build +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +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..42d528e --- /dev/null +++ b/tests/build/root.build @@ -0,0 +1,17 @@ +# file : tests/build/root.build +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +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/tests/buildfile b/tests/buildfile new file mode 100644 index 0000000..881153e --- /dev/null +++ b/tests/buildfile @@ -0,0 +1,8 @@ +# file : tests/buildfile +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +import libs = libstd-modules%liba{std-modules} + +exe{driver}: cxx{driver} $libs +exe{driver}: test.output = test.out diff --git a/tests/driver.cxx b/tests/driver.cxx new file mode 100644 index 0000000..64a5fb1 --- /dev/null +++ b/tests/driver.cxx @@ -0,0 +1,14 @@ +// file : tests/driver.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +import std.core; +import std.io; + +using namespace std; + +int +main () +{ + cout << string ("Hello, World!") << endl; +} diff --git a/tests/test.out b/tests/test.out new file mode 100644 index 0000000..8ab686e --- /dev/null +++ b/tests/test.out @@ -0,0 +1 @@ +Hello, World! -- cgit v1.1