diff options
Diffstat (limited to 'tests/compiler')
-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 |
6 files changed, 77 insertions, 1 deletions
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 |