mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-14 14:45:40 +00:00
1620 lines
64 KiB
Rust
1620 lines
64 KiB
Rust
|
// Rust test file autogenerated with cargo build (build/spectests.rs).
|
||
|
// Please do NOT modify it by hand, as it will be reset on next build.
|
||
|
// Test based on spectests/call_indirect.wast
|
||
|
#![allow(
|
||
|
warnings,
|
||
|
dead_code
|
||
|
)]
|
||
|
use wabt::wat2wasm;
|
||
|
use std::{f32, f64};
|
||
|
|
||
|
use wasmer_runtime::types::Value;
|
||
|
use wasmer_runtime::{Instance, Module};
|
||
|
use wasmer_clif_backend::CraneliftCompiler;
|
||
|
|
||
|
use crate::spectests::_common::{
|
||
|
spectest_importobject,
|
||
|
NaNCheck,
|
||
|
};
|
||
|
|
||
|
|
||
|
// Line 3
|
||
|
fn create_module_1() -> Box<Instance> {
|
||
|
let module_str = "(module
|
||
|
(type (;0;) (func))
|
||
|
(type (;1;) (func (result i32)))
|
||
|
(type (;2;) (func (result i64)))
|
||
|
(type (;3;) (func (result f32)))
|
||
|
(type (;4;) (func (result f64)))
|
||
|
(type (;5;) (func (param i32) (result i32)))
|
||
|
(type (;6;) (func (param i64) (result i64)))
|
||
|
(type (;7;) (func (param f32) (result f32)))
|
||
|
(type (;8;) (func (param f64) (result f64)))
|
||
|
(type (;9;) (func (param f32 i32) (result i32)))
|
||
|
(type (;10;) (func (param i32 i64) (result i64)))
|
||
|
(type (;11;) (func (param f64 f32) (result f32)))
|
||
|
(type (;12;) (func (param i64 f64) (result f64)))
|
||
|
(type (;13;) (func (param i32) (result i32)))
|
||
|
(type (;14;) (func (param i64) (result i64)))
|
||
|
(type (;15;) (func (param f32) (result f32)))
|
||
|
(type (;16;) (func (param f64) (result f64)))
|
||
|
(type (;17;) (func (param i64)))
|
||
|
(type (;18;) (func (param i64 f64 i32 i64)))
|
||
|
(type (;19;) (func (param i64) (result i32)))
|
||
|
(type (;20;) (func (param i64 f64 i32 i64) (result i32)))
|
||
|
(type (;21;) (func (param i32) (result i64)))
|
||
|
(type (;22;) (func (param i32) (result f32)))
|
||
|
(type (;23;) (func (param i32) (result f64)))
|
||
|
(func (;0;) (type 1) (result i32)
|
||
|
i32.const 306)
|
||
|
(func (;1;) (type 2) (result i64)
|
||
|
i64.const 356)
|
||
|
(func (;2;) (type 3) (result f32)
|
||
|
f32.const 0x1.e64p+11 (;=3890;))
|
||
|
(func (;3;) (type 4) (result f64)
|
||
|
f64.const 0x1.ec8p+11 (;=3940;))
|
||
|
(func (;4;) (type 5) (param i32) (result i32)
|
||
|
get_local 0)
|
||
|
(func (;5;) (type 6) (param i64) (result i64)
|
||
|
get_local 0)
|
||
|
(func (;6;) (type 7) (param f32) (result f32)
|
||
|
get_local 0)
|
||
|
(func (;7;) (type 8) (param f64) (result f64)
|
||
|
get_local 0)
|
||
|
(func (;8;) (type 10) (param i32 i64) (result i64)
|
||
|
get_local 1)
|
||
|
(func (;9;) (type 12) (param i64 f64) (result f64)
|
||
|
get_local 1)
|
||
|
(func (;10;) (type 9) (param f32 i32) (result i32)
|
||
|
get_local 1)
|
||
|
(func (;11;) (type 11) (param f64 f32) (result f32)
|
||
|
get_local 1)
|
||
|
(func (;12;) (type 13) (param i32) (result i32)
|
||
|
get_local 0)
|
||
|
(func (;13;) (type 14) (param i64) (result i64)
|
||
|
get_local 0)
|
||
|
(func (;14;) (type 15) (param f32) (result f32)
|
||
|
get_local 0)
|
||
|
(func (;15;) (type 16) (param f64) (result f64)
|
||
|
get_local 0)
|
||
|
(func (;16;) (type 0)
|
||
|
i32.const 0
|
||
|
call_indirect (type 0)
|
||
|
i64.const 0
|
||
|
i32.const 0
|
||
|
call_indirect (type 17)
|
||
|
i64.const 0
|
||
|
f64.const 0x0p+0 (;=0;)
|
||
|
i32.const 0
|
||
|
i64.const 0
|
||
|
i32.const 0
|
||
|
call_indirect (type 18)
|
||
|
i32.const 0
|
||
|
call_indirect (type 0)
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
i32.eqz
|
||
|
drop
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
i32.eqz
|
||
|
drop
|
||
|
i64.const 0
|
||
|
i32.const 0
|
||
|
call_indirect (type 19)
|
||
|
i32.eqz
|
||
|
drop
|
||
|
i64.const 0
|
||
|
f64.const 0x0p+0 (;=0;)
|
||
|
i32.const 0
|
||
|
i64.const 0
|
||
|
i32.const 0
|
||
|
call_indirect (type 20)
|
||
|
i32.eqz
|
||
|
drop
|
||
|
i64.const 0
|
||
|
i32.const 0
|
||
|
call_indirect (type 6)
|
||
|
i64.eqz
|
||
|
drop)
|
||
|
(func (;17;) (type 1) (result i32)
|
||
|
i32.const 0
|
||
|
call_indirect (type 1))
|
||
|
(func (;18;) (type 2) (result i64)
|
||
|
i32.const 1
|
||
|
call_indirect (type 2))
|
||
|
(func (;19;) (type 3) (result f32)
|
||
|
i32.const 2
|
||
|
call_indirect (type 3))
|
||
|
(func (;20;) (type 4) (result f64)
|
||
|
i32.const 3
|
||
|
call_indirect (type 4))
|
||
|
(func (;21;) (type 2) (result i64)
|
||
|
i64.const 100
|
||
|
i32.const 5
|
||
|
call_indirect (type 6))
|
||
|
(func (;22;) (type 1) (result i32)
|
||
|
i32.const 32
|
||
|
i32.const 4
|
||
|
call_indirect (type 5))
|
||
|
(func (;23;) (type 2) (result i64)
|
||
|
i64.const 64
|
||
|
i32.const 5
|
||
|
call_indirect (type 6))
|
||
|
(func (;24;) (type 3) (result f32)
|
||
|
f32.const 0x1.51eb86p+0 (;=1.32;)
|
||
|
i32.const 6
|
||
|
call_indirect (type 7))
|
||
|
(func (;25;) (type 4) (result f64)
|
||
|
f64.const 0x1.a3d70a3d70a3dp+0 (;=1.64;)
|
||
|
i32.const 7
|
||
|
call_indirect (type 8))
|
||
|
(func (;26;) (type 1) (result i32)
|
||
|
f32.const 0x1.00ccccp+5 (;=32.1;)
|
||
|
i32.const 32
|
||
|
i32.const 8
|
||
|
call_indirect (type 9))
|
||
|
(func (;27;) (type 2) (result i64)
|
||
|
i32.const 32
|
||
|
i64.const 64
|
||
|
i32.const 9
|
||
|
call_indirect (type 10))
|
||
|
(func (;28;) (type 3) (result f32)
|
||
|
f64.const 0x1p+6 (;=64;)
|
||
|
f32.const 0x1p+5 (;=32;)
|
||
|
i32.const 10
|
||
|
call_indirect (type 11))
|
||
|
(func (;29;) (type 4) (result f64)
|
||
|
i64.const 64
|
||
|
f64.const 0x1.0066666666666p+6 (;=64.1;)
|
||
|
i32.const 11
|
||
|
call_indirect (type 12))
|
||
|
(func (;30;) (type 10) (param i32 i64) (result i64)
|
||
|
get_local 1
|
||
|
get_local 0
|
||
|
call_indirect (type 6))
|
||
|
(func (;31;) (type 21) (param i32) (result i64)
|
||
|
i64.const 9
|
||
|
get_local 0
|
||
|
call_indirect (type 14))
|
||
|
(func (;32;) (type 5) (param i32) (result i32)
|
||
|
i32.const 9
|
||
|
get_local 0
|
||
|
call_indirect (type 13))
|
||
|
(func (;33;) (type 22) (param i32) (result f32)
|
||
|
f32.const 0x1.2p+3 (;=9;)
|
||
|
get_local 0
|
||
|
call_indirect (type 15))
|
||
|
(func (;34;) (type 23) (param i32) (result f64)
|
||
|
f64.const 0x1.2p+3 (;=9;)
|
||
|
get_local 0
|
||
|
call_indirect (type 16))
|
||
|
(func (;35;) (type 6) (param i64) (result i64)
|
||
|
get_local 0
|
||
|
i64.eqz
|
||
|
if (result i64) ;; label = @1
|
||
|
i64.const 1
|
||
|
else
|
||
|
get_local 0
|
||
|
get_local 0
|
||
|
i64.const 1
|
||
|
i64.sub
|
||
|
i32.const 12
|
||
|
call_indirect (type 6)
|
||
|
i64.mul
|
||
|
end)
|
||
|
(func (;36;) (type 6) (param i64) (result i64)
|
||
|
get_local 0
|
||
|
i64.const 1
|
||
|
i64.le_u
|
||
|
if (result i64) ;; label = @1
|
||
|
i64.const 1
|
||
|
else
|
||
|
get_local 0
|
||
|
i64.const 2
|
||
|
i64.sub
|
||
|
i32.const 13
|
||
|
call_indirect (type 6)
|
||
|
get_local 0
|
||
|
i64.const 1
|
||
|
i64.sub
|
||
|
i32.const 13
|
||
|
call_indirect (type 6)
|
||
|
i64.add
|
||
|
end)
|
||
|
(func (;37;) (type 5) (param i32) (result i32)
|
||
|
get_local 0
|
||
|
i32.eqz
|
||
|
if (result i32) ;; label = @1
|
||
|
i32.const 1
|
||
|
else
|
||
|
get_local 0
|
||
|
get_local 0
|
||
|
i32.const 1
|
||
|
i32.sub
|
||
|
i32.const 23
|
||
|
call_indirect (type 5)
|
||
|
i32.mul
|
||
|
end)
|
||
|
(func (;38;) (type 7) (param f32) (result f32)
|
||
|
get_local 0
|
||
|
f32.const 0x0p+0 (;=0;)
|
||
|
f32.eq
|
||
|
if (result f32) ;; label = @1
|
||
|
f32.const 0x1p+0 (;=1;)
|
||
|
else
|
||
|
get_local 0
|
||
|
get_local 0
|
||
|
f32.const 0x1p+0 (;=1;)
|
||
|
f32.sub
|
||
|
i32.const 24
|
||
|
call_indirect (type 7)
|
||
|
f32.mul
|
||
|
end)
|
||
|
(func (;39;) (type 8) (param f64) (result f64)
|
||
|
get_local 0
|
||
|
f64.const 0x0p+0 (;=0;)
|
||
|
f64.eq
|
||
|
if (result f64) ;; label = @1
|
||
|
f64.const 0x1p+0 (;=1;)
|
||
|
else
|
||
|
get_local 0
|
||
|
get_local 0
|
||
|
f64.const 0x1p+0 (;=1;)
|
||
|
f64.sub
|
||
|
i32.const 25
|
||
|
call_indirect (type 8)
|
||
|
f64.mul
|
||
|
end)
|
||
|
(func (;40;) (type 5) (param i32) (result i32)
|
||
|
get_local 0
|
||
|
i32.const 1
|
||
|
i32.le_u
|
||
|
if (result i32) ;; label = @1
|
||
|
i32.const 1
|
||
|
else
|
||
|
get_local 0
|
||
|
i32.const 2
|
||
|
i32.sub
|
||
|
i32.const 26
|
||
|
call_indirect (type 5)
|
||
|
get_local 0
|
||
|
i32.const 1
|
||
|
i32.sub
|
||
|
i32.const 26
|
||
|
call_indirect (type 5)
|
||
|
i32.add
|
||
|
end)
|
||
|
(func (;41;) (type 7) (param f32) (result f32)
|
||
|
get_local 0
|
||
|
f32.const 0x1p+0 (;=1;)
|
||
|
f32.le
|
||
|
if (result f32) ;; label = @1
|
||
|
f32.const 0x1p+0 (;=1;)
|
||
|
else
|
||
|
get_local 0
|
||
|
f32.const 0x1p+1 (;=2;)
|
||
|
f32.sub
|
||
|
i32.const 27
|
||
|
call_indirect (type 7)
|
||
|
get_local 0
|
||
|
f32.const 0x1p+0 (;=1;)
|
||
|
f32.sub
|
||
|
i32.const 27
|
||
|
call_indirect (type 7)
|
||
|
f32.add
|
||
|
end)
|
||
|
(func (;42;) (type 8) (param f64) (result f64)
|
||
|
get_local 0
|
||
|
f64.const 0x1p+0 (;=1;)
|
||
|
f64.le
|
||
|
if (result f64) ;; label = @1
|
||
|
f64.const 0x1p+0 (;=1;)
|
||
|
else
|
||
|
get_local 0
|
||
|
f64.const 0x1p+1 (;=2;)
|
||
|
f64.sub
|
||
|
i32.const 28
|
||
|
call_indirect (type 8)
|
||
|
get_local 0
|
||
|
f64.const 0x1p+0 (;=1;)
|
||
|
f64.sub
|
||
|
i32.const 28
|
||
|
call_indirect (type 8)
|
||
|
f64.add
|
||
|
end)
|
||
|
(func (;43;) (type 5) (param i32) (result i32)
|
||
|
get_local 0
|
||
|
i32.eqz
|
||
|
if (result i32) ;; label = @1
|
||
|
i32.const 44
|
||
|
else
|
||
|
get_local 0
|
||
|
i32.const 1
|
||
|
i32.sub
|
||
|
i32.const 15
|
||
|
call_indirect (type 5)
|
||
|
end)
|
||
|
(func (;44;) (type 5) (param i32) (result i32)
|
||
|
get_local 0
|
||
|
i32.eqz
|
||
|
if (result i32) ;; label = @1
|
||
|
i32.const 99
|
||
|
else
|
||
|
get_local 0
|
||
|
i32.const 1
|
||
|
i32.sub
|
||
|
i32.const 14
|
||
|
call_indirect (type 5)
|
||
|
end)
|
||
|
(func (;45;) (type 0)
|
||
|
i32.const 16
|
||
|
call_indirect (type 0))
|
||
|
(func (;46;) (type 0)
|
||
|
i32.const 18
|
||
|
call_indirect (type 0))
|
||
|
(func (;47;) (type 0)
|
||
|
i32.const 17
|
||
|
call_indirect (type 0))
|
||
|
(func (;48;) (type 1) (result i32)
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
i32.const 2
|
||
|
i32.const 3
|
||
|
select)
|
||
|
(func (;49;) (type 1) (result i32)
|
||
|
i32.const 2
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
i32.const 3
|
||
|
select)
|
||
|
(func (;50;) (type 1) (result i32)
|
||
|
i32.const 2
|
||
|
i32.const 3
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
select)
|
||
|
(func (;51;) (type 1) (result i32)
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
if (result i32) ;; label = @1
|
||
|
i32.const 1
|
||
|
else
|
||
|
i32.const 2
|
||
|
end)
|
||
|
(func (;52;) (type 2) (result i64)
|
||
|
block (result i64) ;; label = @1
|
||
|
i32.const 1
|
||
|
call_indirect (type 2)
|
||
|
i32.const 2
|
||
|
br_if 0 (;@1;)
|
||
|
end)
|
||
|
(func (;53;) (type 1) (result i32)
|
||
|
block (result i32) ;; label = @1
|
||
|
i32.const 2
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
br_if 0 (;@1;)
|
||
|
end)
|
||
|
(func (;54;) (type 3) (result f32)
|
||
|
block (result f32) ;; label = @1
|
||
|
i32.const 2
|
||
|
call_indirect (type 3)
|
||
|
i32.const 2
|
||
|
br_table 0 (;@1;) 0 (;@1;)
|
||
|
end)
|
||
|
(func (;55;) (type 1) (result i32)
|
||
|
block (result i32) ;; label = @1
|
||
|
i32.const 2
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
br_table 0 (;@1;) 0 (;@1;)
|
||
|
end)
|
||
|
(func (;56;) (type 0)
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
i32.const 1
|
||
|
i32.store)
|
||
|
(func (;57;) (type 0)
|
||
|
i32.const 10
|
||
|
i32.const 3
|
||
|
call_indirect (type 4)
|
||
|
f64.store)
|
||
|
(func (;58;) (type 1) (result i32)
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
memory.grow)
|
||
|
(func (;59;) (type 1) (result i32)
|
||
|
i32.const 1
|
||
|
i32.const 4
|
||
|
call_indirect (type 5)
|
||
|
return)
|
||
|
(func (;60;) (type 0)
|
||
|
i64.const 1
|
||
|
i32.const 5
|
||
|
call_indirect (type 6)
|
||
|
drop)
|
||
|
(func (;61;) (type 3) (result f32)
|
||
|
block (result f32) ;; label = @1
|
||
|
f32.const 0x1p+0 (;=1;)
|
||
|
i32.const 6
|
||
|
call_indirect (type 7)
|
||
|
br 0 (;@1;)
|
||
|
end)
|
||
|
(func (;62;) (type 4) (result f64)
|
||
|
(local f64)
|
||
|
f64.const 0x1p+0 (;=1;)
|
||
|
i32.const 7
|
||
|
call_indirect (type 8)
|
||
|
set_local 0
|
||
|
get_local 0)
|
||
|
(func (;63;) (type 4) (result f64)
|
||
|
(local f64)
|
||
|
f64.const 0x1p+0 (;=1;)
|
||
|
i32.const 7
|
||
|
call_indirect (type 8)
|
||
|
tee_local 0)
|
||
|
(func (;64;) (type 4) (result f64)
|
||
|
f64.const 0x1p+0 (;=1;)
|
||
|
i32.const 7
|
||
|
call_indirect (type 8)
|
||
|
set_global 0
|
||
|
get_global 0)
|
||
|
(func (;65;) (type 1) (result i32)
|
||
|
i32.const 0
|
||
|
call_indirect (type 1)
|
||
|
i32.load)
|
||
|
(table (;0;) 29 29 anyfunc)
|
||
|
(memory (;0;) 1)
|
||
|
(global (;0;) (mut f64) (f64.const 0x1.4p+3 (;=10;)))
|
||
|
(export \"type-i32\" (func 17))
|
||
|
(export \"type-i64\" (func 18))
|
||
|
(export \"type-f32\" (func 19))
|
||
|
(export \"type-f64\" (func 20))
|
||
|
(export \"type-index\" (func 21))
|
||
|
(export \"type-first-i32\" (func 22))
|
||
|
(export \"type-first-i64\" (func 23))
|
||
|
(export \"type-first-f32\" (func 24))
|
||
|
(export \"type-first-f64\" (func 25))
|
||
|
(export \"type-second-i32\" (func 26))
|
||
|
(export \"type-second-i64\" (func 27))
|
||
|
(export \"type-second-f32\" (func 28))
|
||
|
(export \"type-second-f64\" (func 29))
|
||
|
(export \"dispatch\" (func 30))
|
||
|
(export \"dispatch-structural-i64\" (func 31))
|
||
|
(export \"dispatch-structural-i32\" (func 32))
|
||
|
(export \"dispatch-structural-f32\" (func 33))
|
||
|
(export \"dispatch-structural-f64\" (func 34))
|
||
|
(export \"fac-i64\" (func 35))
|
||
|
(export \"fib-i64\" (func 36))
|
||
|
(export \"fac-i32\" (func 37))
|
||
|
(export \"fac-f32\" (func 38))
|
||
|
(export \"fac-f64\" (func 39))
|
||
|
(export \"fib-i32\" (func 40))
|
||
|
(export \"fib-f32\" (func 41))
|
||
|
(export \"fib-f64\" (func 42))
|
||
|
(export \"even\" (func 43))
|
||
|
(export \"odd\" (func 44))
|
||
|
(export \"runaway\" (func 45))
|
||
|
(export \"mutual-runaway\" (func 46))
|
||
|
(export \"as-select-first\" (func 48))
|
||
|
(export \"as-select-mid\" (func 49))
|
||
|
(export \"as-select-last\" (func 50))
|
||
|
(export \"as-if-condition\" (func 51))
|
||
|
(export \"as-br_if-first\" (func 52))
|
||
|
(export \"as-br_if-last\" (func 53))
|
||
|
(export \"as-br_table-first\" (func 54))
|
||
|
(export \"as-br_table-last\" (func 55))
|
||
|
(export \"as-store-first\" (func 56))
|
||
|
(export \"as-store-last\" (func 57))
|
||
|
(export \"as-memory.grow-value\" (func 58))
|
||
|
(export \"as-return-value\" (func 59))
|
||
|
(export \"as-drop-operand\" (func 60))
|
||
|
(export \"as-br-value\" (func 61))
|
||
|
(export \"as-set_local-value\" (func 62))
|
||
|
(export \"as-tee_local-value\" (func 63))
|
||
|
(export \"as-set_global-value\" (func 64))
|
||
|
(export \"as-load-operand\" (func 65))
|
||
|
(elem (;0;) (i32.const 0) 0 1 2 3 4 5 6 7 10 8 11 9 35 36 43 44 45 46 47 12 13 14 15 37 38 39 40 41 42))
|
||
|
";
|
||
|
let wasm_binary = wat2wasm(module_str.as_bytes()).expect("WAST not valid or malformed");
|
||
|
let module = wasmer_runtime::compile(&wasm_binary[..], &CraneliftCompiler::new()).expect("WASM can't be compiled");
|
||
|
module.instantiate(&spectest_importobject()).expect("WASM can't be instantiated")
|
||
|
}
|
||
|
|
||
|
fn start_module_1(instance: &mut Instance) {
|
||
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
||
|
//instance.start();
|
||
|
}
|
||
|
|
||
|
// Line 388
|
||
|
fn c1_l388_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c1_l388_action_invoke");
|
||
|
let result = instance.call("type-i32", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(306 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 389
|
||
|
fn c2_l389_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c2_l389_action_invoke");
|
||
|
let result = instance.call("type-i64", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(356 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 390
|
||
|
fn c3_l390_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c3_l390_action_invoke");
|
||
|
let result = instance.call("type-f32", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((3890.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 391
|
||
|
fn c4_l391_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c4_l391_action_invoke");
|
||
|
let result = instance.call("type-f64", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((3940.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 393
|
||
|
fn c5_l393_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c5_l393_action_invoke");
|
||
|
let result = instance.call("type-index", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(100 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 395
|
||
|
fn c6_l395_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c6_l395_action_invoke");
|
||
|
let result = instance.call("type-first-i32", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(32 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 396
|
||
|
fn c7_l396_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c7_l396_action_invoke");
|
||
|
let result = instance.call("type-first-i64", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(64 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 397
|
||
|
fn c8_l397_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c8_l397_action_invoke");
|
||
|
let result = instance.call("type-first-f32", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((1.32f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 398
|
||
|
fn c9_l398_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c9_l398_action_invoke");
|
||
|
let result = instance.call("type-first-f64", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((1.64f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 400
|
||
|
fn c10_l400_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c10_l400_action_invoke");
|
||
|
let result = instance.call("type-second-i32", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(32 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 401
|
||
|
fn c11_l401_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c11_l401_action_invoke");
|
||
|
let result = instance.call("type-second-i64", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(64 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 402
|
||
|
fn c12_l402_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c12_l402_action_invoke");
|
||
|
let result = instance.call("type-second-f32", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((32.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 403
|
||
|
fn c13_l403_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c13_l403_action_invoke");
|
||
|
let result = instance.call("type-second-f64", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((64.1f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 405
|
||
|
fn c14_l405_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c14_l405_action_invoke");
|
||
|
let result = instance.call("dispatch", &[Value::I32(5 as i32), Value::I64(2 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(2 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 406
|
||
|
fn c15_l406_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c15_l406_action_invoke");
|
||
|
let result = instance.call("dispatch", &[Value::I32(5 as i32), Value::I64(5 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(5 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 407
|
||
|
fn c16_l407_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c16_l407_action_invoke");
|
||
|
let result = instance.call("dispatch", &[Value::I32(12 as i32), Value::I64(5 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(120 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 408
|
||
|
fn c17_l408_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c17_l408_action_invoke");
|
||
|
let result = instance.call("dispatch", &[Value::I32(13 as i32), Value::I64(5 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(8 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 409
|
||
|
fn c18_l409_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c18_l409_action_invoke");
|
||
|
let result = instance.call("dispatch", &[Value::I32(20 as i32), Value::I64(2 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(2 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 420
|
||
|
fn c19_l420_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c19_l420_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-i64", &[Value::I32(5 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(9 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 421
|
||
|
fn c20_l421_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c20_l421_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-i64", &[Value::I32(12 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(362880 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 422
|
||
|
fn c21_l422_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c21_l422_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-i64", &[Value::I32(13 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(55 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 423
|
||
|
fn c22_l423_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c22_l423_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-i64", &[Value::I32(20 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(9 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 429
|
||
|
fn c23_l429_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c23_l429_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-i32", &[Value::I32(4 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(9 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 430
|
||
|
fn c24_l430_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c24_l430_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-i32", &[Value::I32(23 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(362880 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 431
|
||
|
fn c25_l431_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c25_l431_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-i32", &[Value::I32(26 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(55 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 432
|
||
|
fn c26_l432_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c26_l432_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-i32", &[Value::I32(19 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(9 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 438
|
||
|
fn c27_l438_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c27_l438_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-f32", &[Value::I32(6 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((9.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 439
|
||
|
fn c28_l439_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c28_l439_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-f32", &[Value::I32(24 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((362880.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 440
|
||
|
fn c29_l440_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c29_l440_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-f32", &[Value::I32(27 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((55.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 441
|
||
|
fn c30_l441_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c30_l441_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-f32", &[Value::I32(21 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((9.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 447
|
||
|
fn c31_l447_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c31_l447_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-f64", &[Value::I32(7 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((9.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 448
|
||
|
fn c32_l448_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c32_l448_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-f64", &[Value::I32(25 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((362880.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 449
|
||
|
fn c33_l449_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c33_l449_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-f64", &[Value::I32(28 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((55.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 450
|
||
|
fn c34_l450_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c34_l450_action_invoke");
|
||
|
let result = instance.call("dispatch-structural-f64", &[Value::I32(22 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((9.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 456
|
||
|
fn c35_l456_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c35_l456_action_invoke");
|
||
|
let result = instance.call("fac-i64", &[Value::I64(0 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(1 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 457
|
||
|
fn c36_l457_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c36_l457_action_invoke");
|
||
|
let result = instance.call("fac-i64", &[Value::I64(1 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(1 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 458
|
||
|
fn c37_l458_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c37_l458_action_invoke");
|
||
|
let result = instance.call("fac-i64", &[Value::I64(5 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(120 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 459
|
||
|
fn c38_l459_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c38_l459_action_invoke");
|
||
|
let result = instance.call("fac-i64", &[Value::I64(25 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(7034535277573963776 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 461
|
||
|
fn c39_l461_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c39_l461_action_invoke");
|
||
|
let result = instance.call("fac-i32", &[Value::I32(0 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(1 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 462
|
||
|
fn c40_l462_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c40_l462_action_invoke");
|
||
|
let result = instance.call("fac-i32", &[Value::I32(1 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(1 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 463
|
||
|
fn c41_l463_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c41_l463_action_invoke");
|
||
|
let result = instance.call("fac-i32", &[Value::I32(5 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(120 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 464
|
||
|
fn c42_l464_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c42_l464_action_invoke");
|
||
|
let result = instance.call("fac-i32", &[Value::I32(10 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(3628800 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 466
|
||
|
fn c43_l466_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c43_l466_action_invoke");
|
||
|
let result = instance.call("fac-f32", &[Value::F32((0.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((1.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 467
|
||
|
fn c44_l467_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c44_l467_action_invoke");
|
||
|
let result = instance.call("fac-f32", &[Value::F32((1.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((1.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 468
|
||
|
fn c45_l468_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c45_l468_action_invoke");
|
||
|
let result = instance.call("fac-f32", &[Value::F32((5.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((120.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 469
|
||
|
fn c46_l469_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c46_l469_action_invoke");
|
||
|
let result = instance.call("fac-f32", &[Value::F32((10.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((3628800.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 471
|
||
|
fn c47_l471_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c47_l471_action_invoke");
|
||
|
let result = instance.call("fac-f64", &[Value::F64((0.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((1.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 472
|
||
|
fn c48_l472_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c48_l472_action_invoke");
|
||
|
let result = instance.call("fac-f64", &[Value::F64((1.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((1.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 473
|
||
|
fn c49_l473_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c49_l473_action_invoke");
|
||
|
let result = instance.call("fac-f64", &[Value::F64((5.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((120.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 474
|
||
|
fn c50_l474_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c50_l474_action_invoke");
|
||
|
let result = instance.call("fac-f64", &[Value::F64((10.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((3628800.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 476
|
||
|
fn c51_l476_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c51_l476_action_invoke");
|
||
|
let result = instance.call("fib-i64", &[Value::I64(0 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(1 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 477
|
||
|
fn c52_l477_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c52_l477_action_invoke");
|
||
|
let result = instance.call("fib-i64", &[Value::I64(1 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(1 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 478
|
||
|
fn c53_l478_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c53_l478_action_invoke");
|
||
|
let result = instance.call("fib-i64", &[Value::I64(2 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(2 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 479
|
||
|
fn c54_l479_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c54_l479_action_invoke");
|
||
|
let result = instance.call("fib-i64", &[Value::I64(5 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(8 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 480
|
||
|
fn c55_l480_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c55_l480_action_invoke");
|
||
|
let result = instance.call("fib-i64", &[Value::I64(20 as i64)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(10946 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 482
|
||
|
fn c56_l482_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c56_l482_action_invoke");
|
||
|
let result = instance.call("fib-i32", &[Value::I32(0 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(1 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 483
|
||
|
fn c57_l483_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c57_l483_action_invoke");
|
||
|
let result = instance.call("fib-i32", &[Value::I32(1 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(1 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 484
|
||
|
fn c58_l484_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c58_l484_action_invoke");
|
||
|
let result = instance.call("fib-i32", &[Value::I32(2 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(2 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 485
|
||
|
fn c59_l485_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c59_l485_action_invoke");
|
||
|
let result = instance.call("fib-i32", &[Value::I32(5 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(8 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 486
|
||
|
fn c60_l486_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c60_l486_action_invoke");
|
||
|
let result = instance.call("fib-i32", &[Value::I32(20 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(10946 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 488
|
||
|
fn c61_l488_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c61_l488_action_invoke");
|
||
|
let result = instance.call("fib-f32", &[Value::F32((0.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((1.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 489
|
||
|
fn c62_l489_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c62_l489_action_invoke");
|
||
|
let result = instance.call("fib-f32", &[Value::F32((1.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((1.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 490
|
||
|
fn c63_l490_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c63_l490_action_invoke");
|
||
|
let result = instance.call("fib-f32", &[Value::F32((2.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((2.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 491
|
||
|
fn c64_l491_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c64_l491_action_invoke");
|
||
|
let result = instance.call("fib-f32", &[Value::F32((5.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((8.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 492
|
||
|
fn c65_l492_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c65_l492_action_invoke");
|
||
|
let result = instance.call("fib-f32", &[Value::F32((20.0f32).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((10946.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 494
|
||
|
fn c66_l494_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c66_l494_action_invoke");
|
||
|
let result = instance.call("fib-f64", &[Value::F64((0.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((1.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 495
|
||
|
fn c67_l495_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c67_l495_action_invoke");
|
||
|
let result = instance.call("fib-f64", &[Value::F64((1.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((1.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 496
|
||
|
fn c68_l496_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c68_l496_action_invoke");
|
||
|
let result = instance.call("fib-f64", &[Value::F64((2.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((2.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 497
|
||
|
fn c69_l497_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c69_l497_action_invoke");
|
||
|
let result = instance.call("fib-f64", &[Value::F64((5.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((8.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 498
|
||
|
fn c70_l498_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c70_l498_action_invoke");
|
||
|
let result = instance.call("fib-f64", &[Value::F64((20.0f64).to_bits())]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((10946.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 500
|
||
|
fn c71_l500_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c71_l500_action_invoke");
|
||
|
let result = instance.call("even", &[Value::I32(0 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(44 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 501
|
||
|
fn c72_l501_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c72_l501_action_invoke");
|
||
|
let result = instance.call("even", &[Value::I32(1 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(99 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 502
|
||
|
fn c73_l502_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c73_l502_action_invoke");
|
||
|
let result = instance.call("even", &[Value::I32(100 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(44 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 503
|
||
|
fn c74_l503_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c74_l503_action_invoke");
|
||
|
let result = instance.call("even", &[Value::I32(77 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(99 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 504
|
||
|
fn c75_l504_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c75_l504_action_invoke");
|
||
|
let result = instance.call("odd", &[Value::I32(0 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(99 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 505
|
||
|
fn c76_l505_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c76_l505_action_invoke");
|
||
|
let result = instance.call("odd", &[Value::I32(1 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(44 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 506
|
||
|
fn c77_l506_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c77_l506_action_invoke");
|
||
|
let result = instance.call("odd", &[Value::I32(200 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(99 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 507
|
||
|
fn c78_l507_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c78_l507_action_invoke");
|
||
|
let result = instance.call("odd", &[Value::I32(77 as i32)]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(44 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 509
|
||
|
|
||
|
// Line 510
|
||
|
|
||
|
// Line 512
|
||
|
fn c81_l512_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c81_l512_action_invoke");
|
||
|
let result = instance.call("as-select-first", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(306 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 513
|
||
|
fn c82_l513_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c82_l513_action_invoke");
|
||
|
let result = instance.call("as-select-mid", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(2 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 514
|
||
|
fn c83_l514_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c83_l514_action_invoke");
|
||
|
let result = instance.call("as-select-last", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(2 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 516
|
||
|
fn c84_l516_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c84_l516_action_invoke");
|
||
|
let result = instance.call("as-if-condition", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(1 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 518
|
||
|
fn c85_l518_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c85_l518_action_invoke");
|
||
|
let result = instance.call("as-br_if-first", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I64(356 as i64))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 519
|
||
|
fn c86_l519_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c86_l519_action_invoke");
|
||
|
let result = instance.call("as-br_if-last", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(2 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 521
|
||
|
fn c87_l521_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c87_l521_action_invoke");
|
||
|
let result = instance.call("as-br_table-first", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((3890.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 522
|
||
|
fn c88_l522_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c88_l522_action_invoke");
|
||
|
let result = instance.call("as-br_table-last", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(2 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 524
|
||
|
fn c89_l524_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c89_l524_action_invoke");
|
||
|
let result = instance.call("as-store-first", &[]);
|
||
|
assert_eq!(result, Ok(None));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 525
|
||
|
fn c90_l525_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c90_l525_action_invoke");
|
||
|
let result = instance.call("as-store-last", &[]);
|
||
|
assert_eq!(result, Ok(None));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 527
|
||
|
fn c91_l527_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c91_l527_action_invoke");
|
||
|
let result = instance.call("as-memory.grow-value", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(1 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 528
|
||
|
fn c92_l528_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c92_l528_action_invoke");
|
||
|
let result = instance.call("as-return-value", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(1 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 529
|
||
|
fn c93_l529_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c93_l529_action_invoke");
|
||
|
let result = instance.call("as-drop-operand", &[]);
|
||
|
assert_eq!(result, Ok(None));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 530
|
||
|
fn c94_l530_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c94_l530_action_invoke");
|
||
|
let result = instance.call("as-br-value", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F32((1.0f32).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 531
|
||
|
fn c95_l531_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c95_l531_action_invoke");
|
||
|
let result = instance.call("as-set_local-value", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((1.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 532
|
||
|
fn c96_l532_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c96_l532_action_invoke");
|
||
|
let result = instance.call("as-tee_local-value", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((1.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 533
|
||
|
fn c97_l533_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c97_l533_action_invoke");
|
||
|
let result = instance.call("as-set_global-value", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::F64((1.0f64).to_bits()))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 534
|
||
|
fn c98_l534_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
||
|
println!("Executing function {}", "c98_l534_action_invoke");
|
||
|
let result = instance.call("as-load-operand", &[]);
|
||
|
assert_eq!(result, Ok(Some(Value::I32(1 as i32))));
|
||
|
result.map(|_| ())
|
||
|
}
|
||
|
|
||
|
// Line 539
|
||
|
#[test]
|
||
|
fn c99_l539_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 32, 32, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 32, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 551
|
||
|
#[test]
|
||
|
fn c100_l551_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 32, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 32, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 563
|
||
|
#[test]
|
||
|
fn c101_l563_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 32, 32, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 32, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 575
|
||
|
#[test]
|
||
|
fn c102_l575_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 32, 32, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 32, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 587
|
||
|
#[test]
|
||
|
fn c103_l587_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 32, 32, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 32, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 599
|
||
|
#[test]
|
||
|
fn c104_l599_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 609
|
||
|
#[test]
|
||
|
fn c105_l609_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 112, 97, 114, 97, 109, 32, 36, 120, 32, 105, 51, 50, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 616
|
||
|
#[test]
|
||
|
fn c106_l616_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 626
|
||
|
#[test]
|
||
|
fn c107_l626_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 636
|
||
|
#[test]
|
||
|
fn c108_l636_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 646
|
||
|
#[test]
|
||
|
fn c109_l646_assert_malformed() {
|
||
|
let wasm_binary = [40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 32, 40, 102, 117, 110, 99, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 41, 41, 40, 116, 97, 98, 108, 101, 32, 48, 32, 97, 110, 121, 102, 117, 110, 99, 41, 40, 102, 117, 110, 99, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 40, 99, 97, 108, 108, 95, 105, 110, 100, 105, 114, 101, 99, 116, 32, 40, 116, 121, 112, 101, 32, 36, 115, 105, 103, 41, 32, 40, 112, 97, 114, 97, 109, 32, 105, 51, 50, 41, 32, 40, 114, 101, 115, 117, 108, 116, 32, 105, 51, 50, 41, 32, 32, 32, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 32, 41, 41];
|
||
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
||
|
}
|
||
|
|
||
|
// Line 661
|
||
|
#[test]
|
||
|
fn c110_l661_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 10, 9, 1, 7, 0, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 669
|
||
|
#[test]
|
||
|
fn c111_l669_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 4, 4, 1, 112, 0, 0, 10, 10, 1, 8, 0, 65, 0, 17, 0, 0, 69, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 677
|
||
|
#[test]
|
||
|
fn c112_l677_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 8, 2, 96, 0, 1, 126, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 10, 1, 8, 0, 65, 0, 17, 0, 0, 69, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 686
|
||
|
#[test]
|
||
|
fn c113_l686_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 8, 2, 96, 1, 127, 0, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 9, 1, 7, 0, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 694
|
||
|
#[test]
|
||
|
fn c114_l694_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 9, 2, 96, 2, 124, 127, 0, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 9, 1, 7, 0, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 702
|
||
|
#[test]
|
||
|
fn c115_l702_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 4, 4, 1, 112, 0, 0, 10, 11, 1, 9, 0, 65, 1, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 710
|
||
|
#[test]
|
||
|
fn c116_l710_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 4, 4, 1, 112, 0, 0, 10, 20, 1, 18, 0, 68, 0, 0, 0, 0, 0, 0, 0, 64, 65, 1, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 721
|
||
|
#[test]
|
||
|
fn c117_l721_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 8, 2, 96, 1, 127, 0, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 10, 1, 8, 0, 65, 1, 1, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 729
|
||
|
#[test]
|
||
|
fn c118_l729_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 8, 2, 96, 1, 127, 0, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 11, 1, 9, 0, 65, 0, 66, 1, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 738
|
||
|
#[test]
|
||
|
fn c119_l738_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 9, 2, 96, 2, 127, 127, 0, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 12, 1, 10, 0, 1, 65, 1, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 748
|
||
|
#[test]
|
||
|
fn c120_l748_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 9, 2, 96, 2, 127, 127, 0, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 12, 1, 10, 0, 65, 1, 1, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 758
|
||
|
#[test]
|
||
|
fn c121_l758_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 9, 2, 96, 2, 127, 124, 0, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 20, 1, 18, 0, 68, 0, 0, 0, 0, 0, 0, 240, 63, 65, 1, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 768
|
||
|
#[test]
|
||
|
fn c122_l768_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 9, 2, 96, 2, 124, 127, 0, 96, 0, 0, 3, 2, 1, 1, 4, 4, 1, 112, 0, 0, 10, 20, 1, 18, 0, 65, 1, 68, 0, 0, 0, 0, 0, 0, 240, 63, 65, 0, 17, 0, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 782
|
||
|
#[test]
|
||
|
fn c123_l782_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 4, 4, 1, 112, 0, 0, 10, 9, 1, 7, 0, 65, 0, 17, 1, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 789
|
||
|
#[test]
|
||
|
fn c124_l789_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 4, 4, 1, 112, 0, 0, 10, 13, 1, 11, 0, 65, 0, 17, 148, 152, 219, 226, 3, 0, 11];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
// Line 800
|
||
|
#[test]
|
||
|
fn c125_l800_assert_invalid() {
|
||
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 4, 5, 1, 112, 1, 2, 2, 9, 8, 1, 0, 65, 0, 11, 2, 0, 0];
|
||
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
||
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn test_module_1() {
|
||
|
let mut instance = create_module_1();
|
||
|
// We group the calls together
|
||
|
start_module_1(&mut instance);
|
||
|
c1_l388_action_invoke(&mut instance);
|
||
|
c2_l389_action_invoke(&mut instance);
|
||
|
c3_l390_action_invoke(&mut instance);
|
||
|
c4_l391_action_invoke(&mut instance);
|
||
|
c5_l393_action_invoke(&mut instance);
|
||
|
c6_l395_action_invoke(&mut instance);
|
||
|
c7_l396_action_invoke(&mut instance);
|
||
|
c8_l397_action_invoke(&mut instance);
|
||
|
c9_l398_action_invoke(&mut instance);
|
||
|
c10_l400_action_invoke(&mut instance);
|
||
|
c11_l401_action_invoke(&mut instance);
|
||
|
c12_l402_action_invoke(&mut instance);
|
||
|
c13_l403_action_invoke(&mut instance);
|
||
|
c14_l405_action_invoke(&mut instance);
|
||
|
c15_l406_action_invoke(&mut instance);
|
||
|
c16_l407_action_invoke(&mut instance);
|
||
|
c17_l408_action_invoke(&mut instance);
|
||
|
c18_l409_action_invoke(&mut instance);
|
||
|
c19_l420_action_invoke(&mut instance);
|
||
|
c20_l421_action_invoke(&mut instance);
|
||
|
c21_l422_action_invoke(&mut instance);
|
||
|
c22_l423_action_invoke(&mut instance);
|
||
|
c23_l429_action_invoke(&mut instance);
|
||
|
c24_l430_action_invoke(&mut instance);
|
||
|
c25_l431_action_invoke(&mut instance);
|
||
|
c26_l432_action_invoke(&mut instance);
|
||
|
c27_l438_action_invoke(&mut instance);
|
||
|
c28_l439_action_invoke(&mut instance);
|
||
|
c29_l440_action_invoke(&mut instance);
|
||
|
c30_l441_action_invoke(&mut instance);
|
||
|
c31_l447_action_invoke(&mut instance);
|
||
|
c32_l448_action_invoke(&mut instance);
|
||
|
c33_l449_action_invoke(&mut instance);
|
||
|
c34_l450_action_invoke(&mut instance);
|
||
|
c35_l456_action_invoke(&mut instance);
|
||
|
c36_l457_action_invoke(&mut instance);
|
||
|
c37_l458_action_invoke(&mut instance);
|
||
|
c38_l459_action_invoke(&mut instance);
|
||
|
c39_l461_action_invoke(&mut instance);
|
||
|
c40_l462_action_invoke(&mut instance);
|
||
|
c41_l463_action_invoke(&mut instance);
|
||
|
c42_l464_action_invoke(&mut instance);
|
||
|
c43_l466_action_invoke(&mut instance);
|
||
|
c44_l467_action_invoke(&mut instance);
|
||
|
c45_l468_action_invoke(&mut instance);
|
||
|
c46_l469_action_invoke(&mut instance);
|
||
|
c47_l471_action_invoke(&mut instance);
|
||
|
c48_l472_action_invoke(&mut instance);
|
||
|
c49_l473_action_invoke(&mut instance);
|
||
|
c50_l474_action_invoke(&mut instance);
|
||
|
c51_l476_action_invoke(&mut instance);
|
||
|
c52_l477_action_invoke(&mut instance);
|
||
|
c53_l478_action_invoke(&mut instance);
|
||
|
c54_l479_action_invoke(&mut instance);
|
||
|
c55_l480_action_invoke(&mut instance);
|
||
|
c56_l482_action_invoke(&mut instance);
|
||
|
c57_l483_action_invoke(&mut instance);
|
||
|
c58_l484_action_invoke(&mut instance);
|
||
|
c59_l485_action_invoke(&mut instance);
|
||
|
c60_l486_action_invoke(&mut instance);
|
||
|
c61_l488_action_invoke(&mut instance);
|
||
|
c62_l489_action_invoke(&mut instance);
|
||
|
c63_l490_action_invoke(&mut instance);
|
||
|
c64_l491_action_invoke(&mut instance);
|
||
|
c65_l492_action_invoke(&mut instance);
|
||
|
c66_l494_action_invoke(&mut instance);
|
||
|
c67_l495_action_invoke(&mut instance);
|
||
|
c68_l496_action_invoke(&mut instance);
|
||
|
c69_l497_action_invoke(&mut instance);
|
||
|
c70_l498_action_invoke(&mut instance);
|
||
|
c71_l500_action_invoke(&mut instance);
|
||
|
c72_l501_action_invoke(&mut instance);
|
||
|
c73_l502_action_invoke(&mut instance);
|
||
|
c74_l503_action_invoke(&mut instance);
|
||
|
c75_l504_action_invoke(&mut instance);
|
||
|
c76_l505_action_invoke(&mut instance);
|
||
|
c77_l506_action_invoke(&mut instance);
|
||
|
c78_l507_action_invoke(&mut instance);
|
||
|
c81_l512_action_invoke(&mut instance);
|
||
|
c82_l513_action_invoke(&mut instance);
|
||
|
c83_l514_action_invoke(&mut instance);
|
||
|
c84_l516_action_invoke(&mut instance);
|
||
|
c85_l518_action_invoke(&mut instance);
|
||
|
c86_l519_action_invoke(&mut instance);
|
||
|
c87_l521_action_invoke(&mut instance);
|
||
|
c88_l522_action_invoke(&mut instance);
|
||
|
c89_l524_action_invoke(&mut instance);
|
||
|
c90_l525_action_invoke(&mut instance);
|
||
|
c91_l527_action_invoke(&mut instance);
|
||
|
c92_l528_action_invoke(&mut instance);
|
||
|
c93_l529_action_invoke(&mut instance);
|
||
|
c94_l530_action_invoke(&mut instance);
|
||
|
c95_l531_action_invoke(&mut instance);
|
||
|
c96_l532_action_invoke(&mut instance);
|
||
|
c97_l533_action_invoke(&mut instance);
|
||
|
c98_l534_action_invoke(&mut instance);
|
||
|
}
|