aboutsummaryrefslogtreecommitdiff
path: root/unit-tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-25 15:40:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-25 15:40:06 +0200
commit427efeae13912b66e1c030c7645a2b1f322dff4d (patch)
treecb263ab770942ebbba3ea631288385b392c4e08c /unit-tests
parent71d9aedda0919fb22e39d6e6ce60506ceb69812e (diff)
Fix few bugs in C++ lexer and parser
Diffstat (limited to 'unit-tests')
-rw-r--r--unit-tests/cc/lexer/preprocessor.test9
-rw-r--r--unit-tests/cc/parser/module.test8
2 files changed, 13 insertions, 4 deletions
diff --git a/unit-tests/cc/lexer/preprocessor.test b/unit-tests/cc/lexer/preprocessor.test
index 2917649..e082062 100644
--- a/unit-tests/cc/lexer/preprocessor.test
+++ b/unit-tests/cc/lexer/preprocessor.test
@@ -36,3 +36,12 @@ $* <<EOI
# 1 "test.cxx" 2
#line 8 "z:\\tmp\\test.hxx"
EOI
+
+: nested
+:
+$* <<EOI >>EOO
+#define FOO(x) #y
+;
+EOI
+';'
+EOO
diff --git a/unit-tests/cc/parser/module.test b/unit-tests/cc/parser/module.test
index f85c969..f2bbaf1 100644
--- a/unit-tests/cc/parser/module.test
+++ b/unit-tests/cc/parser/module.test
@@ -88,7 +88,7 @@ EOO
: brace-missing
:
-$* <<EOI 2>>EOE
+$* <<EOI 2>>EOE != 0
export
{
class foo
@@ -97,12 +97,12 @@ export
module foo;
}
EOI
-stdin:8:1: warning: {}-imbalance detected
+stdin:8:1: error: {}-imbalance detected
EOE
: brace-stray
:
-$* <<EOI 2>>EOE
+$* <<EOI 2>>EOE != 0
export
{
class foo
@@ -111,7 +111,7 @@ export
}
module foo;
EOI
-stdin:6:1: warning: {}-imbalance detected
+stdin:6:1: error: {}-imbalance detected
EOE
: import-missing-name