aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/parser+module.test.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc/parser+module.test.testscript')
-rw-r--r--libbuild2/cc/parser+module.test.testscript23
1 files changed, 15 insertions, 8 deletions
diff --git a/libbuild2/cc/parser+module.test.testscript b/libbuild2/cc/parser+module.test.testscript
index b92f80b..e4ec139 100644
--- a/libbuild2/cc/parser+module.test.testscript
+++ b/libbuild2/cc/parser+module.test.testscript
@@ -45,6 +45,17 @@ EOI
export import foo;
EOO
+: non-import
+:
+$* <<EOI
+import
+foo;
+export import(*a);
+import::inner xi = {};
+::import <a>;
+class import<int>;
+EOI
+
: non-module
:
$* <<EOI
@@ -52,6 +63,10 @@ $* <<EOI
#pragma export module foo;
#pragma module foo;
export namespace bar {int fox ();}
+module
+foo;
+foo::module();
+module::inner yi = {};
EOI
: attribute
@@ -105,14 +120,6 @@ EOI
<stdin>:6:1: warning: extraneous '}'
EOE
-: import-missing-name
-:
-$* <<EOI 2>>EOE != 0
-import ;
-EOI
-<stdin>:1:8: error: module or header name expected instead of ';'
-EOE
-
: module-missing-name
:
$* <<EOI 2>>EOE != 0