diff options
Diffstat (limited to 'unit-tests/cc/lexer/preprocessor.test')
-rw-r--r-- | unit-tests/cc/lexer/preprocessor.test | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/unit-tests/cc/lexer/preprocessor.test b/unit-tests/cc/lexer/preprocessor.test new file mode 100644 index 0000000..2917649 --- /dev/null +++ b/unit-tests/cc/lexer/preprocessor.test @@ -0,0 +1,38 @@ +# file : unit-tests/cc/lexer/preprocessor.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Test preprocessor lines. +# + +: normal +: +$* <<EOI +#pragma message("abc") +EOI + +: multiline +: +$* <<EOI +#pragma message \ +( \ +"abc" \ +) +EOI + +: comment +: +$* <<EOI +#pragma foo /* +bar +baz +*/ +#pragma foo // bar baz +EOI + +: line +: +$* <<EOI +# 1 "test.cxx" 2 +#line 8 "z:\\tmp\\test.hxx" +EOI |