aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-19 17:50:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-19 17:50:36 +0200
commita0f96b95900108705261881b164d779e2db5b824 (patch)
tree108e595a366ed83f6ae690f9f8980f76d71bd029 /tests
Initial implementation
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore1
-rw-r--r--tests/build/.gitignore1
-rw-r--r--tests/build/bootstrap.build9
-rw-r--r--tests/build/root.build17
-rw-r--r--tests/buildfile8
-rw-r--r--tests/driver.cxx14
-rw-r--r--tests/test.out1
7 files changed, 51 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..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!