diff options
-rw-r--r-- | buildfile | 2 | ||||
-rw-r--r-- | tests/.gitignore | 1 | ||||
-rw-r--r-- | tests/build/.gitignore | 1 | ||||
-rw-r--r-- | tests/build/bootstrap.build | 9 | ||||
-rw-r--r-- | tests/build/root.build | 14 | ||||
-rw-r--r-- | tests/buildfile | 7 | ||||
-rw-r--r-- | tests/compiler/buildfile | 7 | ||||
-rw-r--r-- | tests/compiler/cxx-indenter/buildfile | 8 | ||||
-rw-r--r-- | tests/compiler/sloc-counter/buildfile | 7 | ||||
-rw-r--r-- | tests/compiler/sloc-counter/driver.cxx | 2 | ||||
-rw-r--r-- | tests/compiler/sloc-counter/testscript | 46 | ||||
-rw-r--r-- | tests/compiler/traversal/buildfile | 8 | ||||
-rw-r--r-- | tests/container/buildfile | 7 | ||||
-rw-r--r-- | tests/container/multi-index/buildfile | 7 | ||||
-rw-r--r-- | tests/fs/buildfile | 7 | ||||
-rw-r--r-- | tests/fs/path/buildfile | 7 | ||||
-rw-r--r-- | tests/re/buildfile | 8 | ||||
-rw-r--r-- | tests/shared-ptr/buildfile | 7 |
18 files changed, 153 insertions, 2 deletions
@@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -d = cutl/ +d = cutl/ tests/ ./: $d doc{INSTALL LICENSE NEWS README version} file{manifest} include $d 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..904c361 --- /dev/null +++ b/tests/build/bootstrap.build @@ -0,0 +1,9 @@ +# file : tests/build/bootstrap.build +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# 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..d8550db --- /dev/null +++ b/tests/build/root.build @@ -0,0 +1,14 @@ +# file : tests/build/root.build +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +cxx.std = 11 + +using cxx + +hxx{*}: extension = hxx +cxx{*}: extension = cxx + +# Every exe{} in this subproject is by default a test. +# +exe{*}: test = true diff --git a/tests/buildfile b/tests/buildfile new file mode 100644 index 0000000..8401e1b --- /dev/null +++ b/tests/buildfile @@ -0,0 +1,7 @@ +# file : tests/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +d = compiler/ container/ fs/ re/ shared-ptr/ +./: $d +include $d diff --git a/tests/compiler/buildfile b/tests/compiler/buildfile new file mode 100644 index 0000000..8c1604b --- /dev/null +++ b/tests/compiler/buildfile @@ -0,0 +1,7 @@ +# file : tests/compiler/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +d = cxx-indenter/ sloc-counter/ traversal/ +./: $d +include $d diff --git a/tests/compiler/cxx-indenter/buildfile b/tests/compiler/cxx-indenter/buildfile new file mode 100644 index 0000000..aad54c6 --- /dev/null +++ b/tests/compiler/cxx-indenter/buildfile @@ -0,0 +1,8 @@ +# file : tests/compiler/cxx-indenter/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +import libs = libcutl%lib{cutl} + +exe{driver}: cxx{driver} $libs +exe{driver}: test.output = output.std diff --git a/tests/compiler/sloc-counter/buildfile b/tests/compiler/sloc-counter/buildfile new file mode 100644 index 0000000..e84c722 --- /dev/null +++ b/tests/compiler/sloc-counter/buildfile @@ -0,0 +1,7 @@ +# file : tests/compiler/sloc-counter/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +import libs = libcutl%lib{cutl} + +exe{driver}: cxx{driver} $libs test{testscript} diff --git a/tests/compiler/sloc-counter/driver.cxx b/tests/compiler/sloc-counter/driver.cxx index 504fbb7..9d738b3 100644 --- a/tests/compiler/sloc-counter/driver.cxx +++ b/tests/compiler/sloc-counter/driver.cxx @@ -22,7 +22,7 @@ main (int argc, char* argv[]) ostream_filter<sloc_counter, char> filt (cout); - ifstream ifs(argv[1]); + ifstream ifs (argv[1]); for (istream::int_type c (ifs.get ()); c != istream::traits_type::eof (); diff --git a/tests/compiler/sloc-counter/testscript b/tests/compiler/sloc-counter/testscript new file mode 100644 index 0000000..802d406 --- /dev/null +++ b/tests/compiler/sloc-counter/testscript @@ -0,0 +1,46 @@ +# file : tests/compiler/sloc-counter/testscript +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +: c++-program-sloc +: +text = '// C++ comment + // C++ comment + +/* C comment */ + +/* Multiline + C + Comment + + +*/ + +#include <iostream> + +char str[] = "multi\ +line\ +string\ +literal"; + +using namespace std; + + +int main( + int argc /*count*/, + char* argv[] /*array*/) +{ + /* comment start */ int x = 0; + char* s = + /* comment start */"foo"; + int y = 2 + /* tricky stuff *// + 2; + cerr << "Hello, \"world!" << '"'\\''"' << endl; +}'; +cat <"$text" >>>file; +$* file >>EOO +$text + +18 +EOO diff --git a/tests/compiler/traversal/buildfile b/tests/compiler/traversal/buildfile new file mode 100644 index 0000000..414856a --- /dev/null +++ b/tests/compiler/traversal/buildfile @@ -0,0 +1,8 @@ +# file : tests/compiler/traversal/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +import libs = libcutl%lib{cutl} + +exe{driver}: cxx{driver} $libs +exe{driver}: test.output = output.std diff --git a/tests/container/buildfile b/tests/container/buildfile new file mode 100644 index 0000000..3ddbe33 --- /dev/null +++ b/tests/container/buildfile @@ -0,0 +1,7 @@ +# file : tests/container/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +d = multi-index/ +./: $d +include $d diff --git a/tests/container/multi-index/buildfile b/tests/container/multi-index/buildfile new file mode 100644 index 0000000..b42351c --- /dev/null +++ b/tests/container/multi-index/buildfile @@ -0,0 +1,7 @@ +# file : tests/container/multi-index/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +import libs = libcutl%lib{cutl} + +exe{driver}: cxx{driver} $libs diff --git a/tests/fs/buildfile b/tests/fs/buildfile new file mode 100644 index 0000000..8f1ad67 --- /dev/null +++ b/tests/fs/buildfile @@ -0,0 +1,7 @@ +# file : tests/fs/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +d = path/ +./: $d +include $d diff --git a/tests/fs/path/buildfile b/tests/fs/path/buildfile new file mode 100644 index 0000000..dd9b1fe --- /dev/null +++ b/tests/fs/path/buildfile @@ -0,0 +1,7 @@ +# file : tests/fs/path/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +import libs = libcutl%lib{cutl} + +exe{driver}: cxx{driver} $libs diff --git a/tests/re/buildfile b/tests/re/buildfile new file mode 100644 index 0000000..d31eb62 --- /dev/null +++ b/tests/re/buildfile @@ -0,0 +1,8 @@ +# file : tests/re/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +import libs = libcutl%lib{cutl} + +exe{driver}: cxx{driver} $libs +exe{driver}: test = false # @@ TMP, fails. diff --git a/tests/shared-ptr/buildfile b/tests/shared-ptr/buildfile new file mode 100644 index 0000000..fc6fe06 --- /dev/null +++ b/tests/shared-ptr/buildfile @@ -0,0 +1,7 @@ +# file : tests/shared-ptr/buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +import libs = libcutl%lib{cutl} + +exe{driver}: cxx{driver} $libs |