summaryrefslogtreecommitdiff
path: root/test/passes/Oz_fuzz-exec_all-features.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/Oz_fuzz-exec_all-features.wast')
-rw-r--r--test/passes/Oz_fuzz-exec_all-features.wast22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/passes/Oz_fuzz-exec_all-features.wast b/test/passes/Oz_fuzz-exec_all-features.wast
index 520747075..a41e2bf70 100644
--- a/test/passes/Oz_fuzz-exec_all-features.wast
+++ b/test/passes/Oz_fuzz-exec_all-features.wast
@@ -475,6 +475,28 @@
)
)
)
+ (func "array.init"
+ (local $x (ref null $bytes))
+ (local.set $x
+ (array.init $bytes
+ (i32.const 42) ;; first value
+ (i32.const 50) ;; second value
+ (rtt.canon $bytes)
+ )
+ )
+ ;; The length should be 2
+ (call $log
+ (array.len $bytes (local.get $x))
+ )
+ ;; The first value should be 42
+ (call $log
+ (array.get_u $bytes (local.get $x) (i32.const 0))
+ )
+ ;; The second value should be 50
+ (call $log
+ (array.get_u $bytes (local.get $x) (i32.const 1))
+ )
+ )
)
(module
(type $[mut:i8] (array (mut i8)))