summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/validation/rec-groups-no-gc.wast16
-rw-r--r--test/lit/validation/supertypes-no-gc.wast14
2 files changed, 30 insertions, 0 deletions
diff --git a/test/lit/validation/rec-groups-no-gc.wast b/test/lit/validation/rec-groups-no-gc.wast
new file mode 100644
index 000000000..f9710d440
--- /dev/null
+++ b/test/lit/validation/rec-groups-no-gc.wast
@@ -0,0 +1,16 @@
+;; Test that using rec groups types without GC is a validation error.
+
+;; RUN: not wasm-opt %s --hybrid -all --disable-gc 2>&1 | filecheck %s
+
+;; CHECK: all used types should be allowed
+
+(module
+ (rec
+ (type $f1 (func))
+ (type $f2 (func))
+ )
+
+ (func $test (type $f1)
+ (unreachable)
+ )
+)
diff --git a/test/lit/validation/supertypes-no-gc.wast b/test/lit/validation/supertypes-no-gc.wast
new file mode 100644
index 000000000..8b70b5174
--- /dev/null
+++ b/test/lit/validation/supertypes-no-gc.wast
@@ -0,0 +1,14 @@
+;; Test that declaring supertypes without GC is a validation error.
+
+;; RUN: not wasm-opt %s --hybrid -all --disable-gc 2>&1 | filecheck %s
+
+;; CHECK: all used types should be allowed
+
+(module
+ (type $f1 (func_subtype func))
+ (type $f2 (func_subtype $f1))
+
+ (func $test (type $f2)
+ (unreachable)
+ )
+ ) \ No newline at end of file