diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-24 13:24:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-24 13:24:31 +0200 |
commit | 0cef93b4e2e9bf39b0ca542876f9ab1af6d0f01d (patch) | |
tree | 187b83b65f28cdf4f8a2b0feadf392b49554fbf3 /unit-tests/cc/lexer/preprocessor.test | |
parent | b3526a5c925169b3be00a5dd4d8c8222f3a475cd (diff) |
Implement support for tokenization of preprocessed C/C++ source
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 |