summaryrefslogtreecommitdiff
path: root/test/binary
diff options
context:
space:
mode:
Diffstat (limited to 'test/binary')
-rw-r--r--test/binary/bad-function-local-count.txt16
-rw-r--r--test/binary/function-local-count-zero.txt26
2 files changed, 26 insertions, 16 deletions
diff --git a/test/binary/bad-function-local-count.txt b/test/binary/bad-function-local-count.txt
deleted file mode 100644
index 7097d203..00000000
--- a/test/binary/bad-function-local-count.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-;;; TOOL: run-gen-wasm-bad
-magic
-version
-section(TYPE) { count[1] function params[0] results[0] }
-section(FUNCTION) { count[1] sig[0] }
-section(CODE) {
- count[1]
- func {
- local_decls[1]
- locals[0] i32
- }
-}
-(;; STDERR ;;;
-0000018: error: local count must be > 0
-0000018: error: local count must be > 0
-;;; STDERR ;;)
diff --git a/test/binary/function-local-count-zero.txt b/test/binary/function-local-count-zero.txt
new file mode 100644
index 00000000..f70a50f6
--- /dev/null
+++ b/test/binary/function-local-count-zero.txt
@@ -0,0 +1,26 @@
+;;; TOOL: run-gen-wasm
+magic
+version
+section(TYPE) { count[1] function params[0] results[0] }
+section(FUNCTION) { count[2] sig[0] sig[0] }
+section(CODE) {
+ count[2]
+ func {
+ local_decls[1]
+ locals[0] i32
+ }
+ func {
+ local_decls[4]
+ locals[1] i64
+ locals[0] i32
+ locals[2] f64
+ locals[0] f32
+ }
+}
+(;; STDOUT ;;;
+(module
+ (type (;0;) (func))
+ (func (;0;) (type 0))
+ (func (;1;) (type 0)
+ (local i64 f64 f64)))
+;;; STDOUT ;;)