From 77410b0cdde47219d6c6a36533fcb9354f17c3dd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 6 Mar 2019 23:06:30 +0300 Subject: Use new setup for unit tests --- build2/cc/lexer+comment.test.testscript | 88 +++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 build2/cc/lexer+comment.test.testscript (limited to 'build2/cc/lexer+comment.test.testscript') diff --git a/build2/cc/lexer+comment.test.testscript b/build2/cc/lexer+comment.test.testscript new file mode 100644 index 0000000..493c295 --- /dev/null +++ b/build2/cc/lexer+comment.test.testscript @@ -0,0 +1,88 @@ +# file : build2/cc/lexer+comment.test.testscript +# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Test C and C++ comments. +# + +: c-comment +: +$* <"';'" +// /* +; +// */ +EOI + +: c-unterminated +: +$* <>EOE != 0 +/* +comment +EOI +stdin:1:2: error: unterminated comment +EOE + +: cxx-unterminated +: +$* <<:EOI +// comment +EOI + +: in-char-literal +: +$* <>EOO +'//' +'/*'*/ +EOI + + + + +EOO + +: in-string-literal +: +$* <>EOO +"//foo" +"/*"*/ +EOI + + + + +EOO + +: in-raw-string-literal +: +$* <>EOO +R"X( +// foo +/* bar +)X"*/ +EOI + + + +EOO -- cgit v1.1