aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/parser+module.test.testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-17 11:23:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-17 11:23:36 +0200
commit818dd4a4e743bc8c93d1be67685b1f2e5db6dcf5 (patch)
tree57c35b478818ab69fd784263cce193e32bd58479 /libbuild2/cc/parser+module.test.testscript
parent3ac5998ee4d5e30a35ce7c043b9389598d7f147f (diff)
Implement modules pseudo-directive parsing (p1703, p1857)
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