summaryrefslogtreecommitdiff
path: root/libmprint/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libmprint/tests')
-rw-r--r--libmprint/tests/.gitignore1
-rw-r--r--libmprint/tests/build/.gitignore1
-rw-r--r--libmprint/tests/build/bootstrap.build5
-rw-r--r--libmprint/tests/build/root.build13
-rw-r--r--libmprint/tests/buildfile1
-rw-r--r--libmprint/tests/test/buildfile5
-rw-r--r--libmprint/tests/test/driver.cxx10
-rw-r--r--libmprint/tests/test/test.out1
8 files changed, 37 insertions, 0 deletions
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!