diff options
Diffstat (limited to 'test/spec/struct.wast')
-rw-r--r-- | test/spec/struct.wast | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/spec/struct.wast b/test/spec/struct.wast index 20f5a0d63..bac4d4520 100644 --- a/test/spec/struct.wast +++ b/test/spec/struct.wast @@ -105,3 +105,29 @@ ) "invalid rtt" ) + +(assert_invalid + (module + (type $vec (struct (field i32))) + (func $test + (drop + ;; too many arguments + (struct.new_with_rtt $vec (i32.const 1) (i32.const 2) (rtt.canon $vec)) + ) + ) + ) + "invalid number of arguments to struct.new" +) + +(assert_invalid + (module + (type $vec (struct (field i32) (field i32))) + (func $test + (drop + ;; too few arguments + (struct.new_with_rtt $vec (i32.const 1) (rtt.canon $vec)) + ) + ) + ) + "invalid number of arguments to struct.new" +) |