diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-01 12:07:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-01 12:07:18 +0200 |
commit | 0ed86c76239d4f2904ea4ae1a77902a9e0db2a6d (patch) | |
tree | 5e8e1d43a0140f5739b21be7cbe120ebb9360d4f /old-tests/test | |
parent | 12fc75188cc1f0a8c4c443c04e7a022131198c36 (diff) |
Move old tests to old-tests/
Diffstat (limited to 'old-tests/test')
-rw-r--r-- | old-tests/test/generated/build/bootstrap.build | 4 | ||||
-rw-r--r-- | old-tests/test/generated/buildfile | 9 | ||||
-rw-r--r-- | old-tests/test/generated/driver.cxx | 24 | ||||
-rw-r--r-- | old-tests/test/generated/utility.cxx | 1 | ||||
-rw-r--r-- | old-tests/test/simple/build/bootstrap.build | 4 | ||||
-rw-r--r-- | old-tests/test/simple/buildfile | 12 | ||||
-rw-r--r-- | old-tests/test/simple/driver.cxx | 14 | ||||
-rw-r--r-- | old-tests/test/simple/test.out | 1 | ||||
-rw-r--r-- | old-tests/test/simple/utility.cxx | 1 |
9 files changed, 70 insertions, 0 deletions
diff --git a/old-tests/test/generated/build/bootstrap.build b/old-tests/test/generated/build/bootstrap.build new file mode 100644 index 0000000..5428eb8 --- /dev/null +++ b/old-tests/test/generated/build/bootstrap.build @@ -0,0 +1,4 @@ +project = test-generated +amalgamation = # Disabled. +using config +using test diff --git a/old-tests/test/generated/buildfile b/old-tests/test/generated/buildfile new file mode 100644 index 0000000..aacca8b --- /dev/null +++ b/old-tests/test/generated/buildfile @@ -0,0 +1,9 @@ +# Test generated input. +# +using cxx + +exe{utility}: cxx{utility} +exe{driver}: cxx{driver} +exe{driver}: test.input = exe{utility} + +./: exe{driver} diff --git a/old-tests/test/generated/driver.cxx b/old-tests/test/generated/driver.cxx new file mode 100644 index 0000000..008dbf7 --- /dev/null +++ b/old-tests/test/generated/driver.cxx @@ -0,0 +1,24 @@ +#include <iostream> +#include <fstream> + +using namespace std; + +int +main (int argc, char* argv[]) +{ + if (argc != 2) + { + cerr << "usage: " << argv[0] << " <file>" << endl; + return 1; + } + + ifstream ifs (argv[1], ifstream::in | ifstream::binary | ifstream::ate); + + if (!ifs.is_open ()) + cerr << "unable to open " << argv[1] << endl; + + if (ifs.tellg () == 0) + cerr << argv[1] << " is empty" << endl; + + return 0; +} diff --git a/old-tests/test/generated/utility.cxx b/old-tests/test/generated/utility.cxx new file mode 100644 index 0000000..ca2ac4a --- /dev/null +++ b/old-tests/test/generated/utility.cxx @@ -0,0 +1 @@ +int main () {} diff --git a/old-tests/test/simple/build/bootstrap.build b/old-tests/test/simple/build/bootstrap.build new file mode 100644 index 0000000..0b7a347 --- /dev/null +++ b/old-tests/test/simple/build/bootstrap.build @@ -0,0 +1,4 @@ +project = test-simple +amalgamation = # Disabled. +using config +using test diff --git a/old-tests/test/simple/buildfile b/old-tests/test/simple/buildfile new file mode 100644 index 0000000..569c12c --- /dev/null +++ b/old-tests/test/simple/buildfile @@ -0,0 +1,12 @@ +using cxx + +lib{utility}: cxx{utility} +exe{driver}: cxx{driver} #lib{utility} + +#exe{driver}: test.roundtrip = test.out + +exe{*}: test = true +exe{*}: test.output = test.out + +./: lib{utility} exe{driver} +#./: exe{driver} diff --git a/old-tests/test/simple/driver.cxx b/old-tests/test/simple/driver.cxx new file mode 100644 index 0000000..3753821 --- /dev/null +++ b/old-tests/test/simple/driver.cxx @@ -0,0 +1,14 @@ +#include <iostream> +#include <cassert> + +using namespace std; + +int +main () +{ + cerr << "test is running (stderr)" << endl; + //assert (false); + cout << "test is running (stdout)" << endl; + return 0; + //return 1; +} diff --git a/old-tests/test/simple/test.out b/old-tests/test/simple/test.out new file mode 100644 index 0000000..5d63fab --- /dev/null +++ b/old-tests/test/simple/test.out @@ -0,0 +1 @@ +test is running (stdout) diff --git a/old-tests/test/simple/utility.cxx b/old-tests/test/simple/utility.cxx new file mode 100644 index 0000000..c4bb446 --- /dev/null +++ b/old-tests/test/simple/utility.cxx @@ -0,0 +1 @@ +void f (){} |