mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-14 06:35:40 +00:00
2824 lines
101 KiB
Rust
2824 lines
101 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/address.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 (param i32) (result i32)))
|
|
(type (;1;) (func (param i32)))
|
|
(func (;0;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_u)
|
|
(func (;1;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_u)
|
|
(func (;2;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_u offset=1)
|
|
(func (;3;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_u offset=2)
|
|
(func (;4;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_u offset=25)
|
|
(func (;5;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_s)
|
|
(func (;6;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_s)
|
|
(func (;7;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_s offset=1)
|
|
(func (;8;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_s offset=2)
|
|
(func (;9;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load8_s offset=25)
|
|
(func (;10;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_u)
|
|
(func (;11;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_u align=1)
|
|
(func (;12;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_u offset=1 align=1)
|
|
(func (;13;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_u offset=2)
|
|
(func (;14;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_u offset=25)
|
|
(func (;15;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_s)
|
|
(func (;16;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_s align=1)
|
|
(func (;17;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_s offset=1 align=1)
|
|
(func (;18;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_s offset=2)
|
|
(func (;19;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load16_s offset=25)
|
|
(func (;20;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load)
|
|
(func (;21;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load align=1)
|
|
(func (;22;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load offset=1 align=1)
|
|
(func (;23;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load offset=2 align=2)
|
|
(func (;24;) (type 0) (param i32) (result i32)
|
|
get_local 0
|
|
i32.load offset=25)
|
|
(func (;25;) (type 1) (param i32)
|
|
get_local 0
|
|
i32.load8_u offset=4294967295
|
|
drop)
|
|
(func (;26;) (type 1) (param i32)
|
|
get_local 0
|
|
i32.load8_s offset=4294967295
|
|
drop)
|
|
(func (;27;) (type 1) (param i32)
|
|
get_local 0
|
|
i32.load16_u offset=4294967295
|
|
drop)
|
|
(func (;28;) (type 1) (param i32)
|
|
get_local 0
|
|
i32.load16_s offset=4294967295
|
|
drop)
|
|
(func (;29;) (type 1) (param i32)
|
|
get_local 0
|
|
i32.load offset=4294967295
|
|
drop)
|
|
(memory (;0;) 1)
|
|
(export \"8u_good1\" (func 0))
|
|
(export \"8u_good2\" (func 1))
|
|
(export \"8u_good3\" (func 2))
|
|
(export \"8u_good4\" (func 3))
|
|
(export \"8u_good5\" (func 4))
|
|
(export \"8s_good1\" (func 5))
|
|
(export \"8s_good2\" (func 6))
|
|
(export \"8s_good3\" (func 7))
|
|
(export \"8s_good4\" (func 8))
|
|
(export \"8s_good5\" (func 9))
|
|
(export \"16u_good1\" (func 10))
|
|
(export \"16u_good2\" (func 11))
|
|
(export \"16u_good3\" (func 12))
|
|
(export \"16u_good4\" (func 13))
|
|
(export \"16u_good5\" (func 14))
|
|
(export \"16s_good1\" (func 15))
|
|
(export \"16s_good2\" (func 16))
|
|
(export \"16s_good3\" (func 17))
|
|
(export \"16s_good4\" (func 18))
|
|
(export \"16s_good5\" (func 19))
|
|
(export \"32_good1\" (func 20))
|
|
(export \"32_good2\" (func 21))
|
|
(export \"32_good3\" (func 22))
|
|
(export \"32_good4\" (func 23))
|
|
(export \"32_good5\" (func 24))
|
|
(export \"8u_bad\" (func 25))
|
|
(export \"8s_bad\" (func 26))
|
|
(export \"16u_bad\" (func 27))
|
|
(export \"16s_bad\" (func 28))
|
|
(export \"32_bad\" (func 29))
|
|
(data (;0;) (i32.const 0) \"abcdefghijklmnopqrstuvwxyz\"))
|
|
";
|
|
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 104
|
|
fn c1_l104_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c1_l104_action_invoke");
|
|
let result = instance.call("8u_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(97 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 105
|
|
fn c2_l105_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c2_l105_action_invoke");
|
|
let result = instance.call("8u_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(97 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 106
|
|
fn c3_l106_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c3_l106_action_invoke");
|
|
let result = instance.call("8u_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(98 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 107
|
|
fn c4_l107_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c4_l107_action_invoke");
|
|
let result = instance.call("8u_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(99 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 108
|
|
fn c5_l108_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c5_l108_action_invoke");
|
|
let result = instance.call("8u_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(122 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 110
|
|
fn c6_l110_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c6_l110_action_invoke");
|
|
let result = instance.call("8s_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(97 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 111
|
|
fn c7_l111_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c7_l111_action_invoke");
|
|
let result = instance.call("8s_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(97 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 112
|
|
fn c8_l112_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c8_l112_action_invoke");
|
|
let result = instance.call("8s_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(98 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 113
|
|
fn c9_l113_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c9_l113_action_invoke");
|
|
let result = instance.call("8s_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(99 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 114
|
|
fn c10_l114_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c10_l114_action_invoke");
|
|
let result = instance.call("8s_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(122 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 116
|
|
fn c11_l116_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c11_l116_action_invoke");
|
|
let result = instance.call("16u_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(25185 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 117
|
|
fn c12_l117_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c12_l117_action_invoke");
|
|
let result = instance.call("16u_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(25185 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 118
|
|
fn c13_l118_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c13_l118_action_invoke");
|
|
let result = instance.call("16u_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(25442 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 119
|
|
fn c14_l119_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c14_l119_action_invoke");
|
|
let result = instance.call("16u_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(25699 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 120
|
|
fn c15_l120_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c15_l120_action_invoke");
|
|
let result = instance.call("16u_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(122 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 122
|
|
fn c16_l122_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c16_l122_action_invoke");
|
|
let result = instance.call("16s_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(25185 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 123
|
|
fn c17_l123_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c17_l123_action_invoke");
|
|
let result = instance.call("16s_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(25185 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 124
|
|
fn c18_l124_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c18_l124_action_invoke");
|
|
let result = instance.call("16s_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(25442 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 125
|
|
fn c19_l125_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c19_l125_action_invoke");
|
|
let result = instance.call("16s_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(25699 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 126
|
|
fn c20_l126_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c20_l126_action_invoke");
|
|
let result = instance.call("16s_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(122 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 128
|
|
fn c21_l128_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c21_l128_action_invoke");
|
|
let result = instance.call("32_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(1684234849 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 129
|
|
fn c22_l129_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c22_l129_action_invoke");
|
|
let result = instance.call("32_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(1684234849 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 130
|
|
fn c23_l130_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c23_l130_action_invoke");
|
|
let result = instance.call("32_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(1701077858 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 131
|
|
fn c24_l131_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c24_l131_action_invoke");
|
|
let result = instance.call("32_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(1717920867 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 132
|
|
fn c25_l132_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c25_l132_action_invoke");
|
|
let result = instance.call("32_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(122 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 134
|
|
fn c26_l134_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c26_l134_action_invoke");
|
|
let result = instance.call("8u_good1", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 135
|
|
fn c27_l135_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c27_l135_action_invoke");
|
|
let result = instance.call("8u_good2", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 136
|
|
fn c28_l136_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c28_l136_action_invoke");
|
|
let result = instance.call("8u_good3", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 137
|
|
fn c29_l137_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c29_l137_action_invoke");
|
|
let result = instance.call("8u_good4", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 138
|
|
fn c30_l138_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c30_l138_action_invoke");
|
|
let result = instance.call("8u_good5", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 140
|
|
fn c31_l140_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c31_l140_action_invoke");
|
|
let result = instance.call("8s_good1", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 141
|
|
fn c32_l141_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c32_l141_action_invoke");
|
|
let result = instance.call("8s_good2", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 142
|
|
fn c33_l142_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c33_l142_action_invoke");
|
|
let result = instance.call("8s_good3", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 143
|
|
fn c34_l143_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c34_l143_action_invoke");
|
|
let result = instance.call("8s_good4", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 144
|
|
fn c35_l144_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c35_l144_action_invoke");
|
|
let result = instance.call("8s_good5", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 146
|
|
fn c36_l146_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c36_l146_action_invoke");
|
|
let result = instance.call("16u_good1", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 147
|
|
fn c37_l147_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c37_l147_action_invoke");
|
|
let result = instance.call("16u_good2", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 148
|
|
fn c38_l148_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c38_l148_action_invoke");
|
|
let result = instance.call("16u_good3", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 149
|
|
fn c39_l149_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c39_l149_action_invoke");
|
|
let result = instance.call("16u_good4", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 150
|
|
fn c40_l150_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c40_l150_action_invoke");
|
|
let result = instance.call("16u_good5", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 152
|
|
fn c41_l152_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c41_l152_action_invoke");
|
|
let result = instance.call("16s_good1", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 153
|
|
fn c42_l153_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c42_l153_action_invoke");
|
|
let result = instance.call("16s_good2", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 154
|
|
fn c43_l154_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c43_l154_action_invoke");
|
|
let result = instance.call("16s_good3", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 155
|
|
fn c44_l155_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c44_l155_action_invoke");
|
|
let result = instance.call("16s_good4", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 156
|
|
fn c45_l156_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c45_l156_action_invoke");
|
|
let result = instance.call("16s_good5", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 158
|
|
fn c46_l158_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c46_l158_action_invoke");
|
|
let result = instance.call("32_good1", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 159
|
|
fn c47_l159_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c47_l159_action_invoke");
|
|
let result = instance.call("32_good2", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 160
|
|
fn c48_l160_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c48_l160_action_invoke");
|
|
let result = instance.call("32_good3", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 161
|
|
fn c49_l161_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c49_l161_action_invoke");
|
|
let result = instance.call("32_good4", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 162
|
|
fn c50_l162_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c50_l162_action_invoke");
|
|
let result = instance.call("32_good5", &[Value::I32(65507 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 164
|
|
fn c51_l164_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c51_l164_action_invoke");
|
|
let result = instance.call("8u_good1", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 165
|
|
fn c52_l165_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c52_l165_action_invoke");
|
|
let result = instance.call("8u_good2", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 166
|
|
fn c53_l166_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c53_l166_action_invoke");
|
|
let result = instance.call("8u_good3", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 167
|
|
fn c54_l167_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c54_l167_action_invoke");
|
|
let result = instance.call("8u_good4", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 168
|
|
fn c55_l168_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c55_l168_action_invoke");
|
|
let result = instance.call("8u_good5", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 170
|
|
fn c56_l170_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c56_l170_action_invoke");
|
|
let result = instance.call("8s_good1", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 171
|
|
fn c57_l171_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c57_l171_action_invoke");
|
|
let result = instance.call("8s_good2", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 172
|
|
fn c58_l172_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c58_l172_action_invoke");
|
|
let result = instance.call("8s_good3", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 173
|
|
fn c59_l173_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c59_l173_action_invoke");
|
|
let result = instance.call("8s_good4", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 174
|
|
fn c60_l174_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c60_l174_action_invoke");
|
|
let result = instance.call("8s_good5", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 176
|
|
fn c61_l176_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c61_l176_action_invoke");
|
|
let result = instance.call("16u_good1", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 177
|
|
fn c62_l177_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c62_l177_action_invoke");
|
|
let result = instance.call("16u_good2", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 178
|
|
fn c63_l178_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c63_l178_action_invoke");
|
|
let result = instance.call("16u_good3", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 179
|
|
fn c64_l179_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c64_l179_action_invoke");
|
|
let result = instance.call("16u_good4", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 180
|
|
fn c65_l180_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c65_l180_action_invoke");
|
|
let result = instance.call("16u_good5", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 182
|
|
fn c66_l182_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c66_l182_action_invoke");
|
|
let result = instance.call("16s_good1", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 183
|
|
fn c67_l183_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c67_l183_action_invoke");
|
|
let result = instance.call("16s_good2", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 184
|
|
fn c68_l184_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c68_l184_action_invoke");
|
|
let result = instance.call("16s_good3", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 185
|
|
fn c69_l185_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c69_l185_action_invoke");
|
|
let result = instance.call("16s_good4", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 186
|
|
fn c70_l186_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c70_l186_action_invoke");
|
|
let result = instance.call("16s_good5", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 188
|
|
fn c71_l188_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c71_l188_action_invoke");
|
|
let result = instance.call("32_good1", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 189
|
|
fn c72_l189_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c72_l189_action_invoke");
|
|
let result = instance.call("32_good2", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 190
|
|
fn c73_l190_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c73_l190_action_invoke");
|
|
let result = instance.call("32_good3", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 191
|
|
fn c74_l191_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c74_l191_action_invoke");
|
|
let result = instance.call("32_good4", &[Value::I32(65508 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I32(0 as i32))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 192
|
|
fn c75_l192_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c75_l192_action_invoke");
|
|
let result = instance.call("32_good5", &[Value::I32(65508 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c75_l192_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c75_l192_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 194
|
|
fn c76_l194_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c76_l194_action_invoke");
|
|
let result = instance.call("8u_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c76_l194_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c76_l194_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 195
|
|
fn c77_l195_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c77_l195_action_invoke");
|
|
let result = instance.call("8s_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c77_l195_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c77_l195_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 196
|
|
fn c78_l196_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c78_l196_action_invoke");
|
|
let result = instance.call("16u_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c78_l196_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c78_l196_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 197
|
|
fn c79_l197_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c79_l197_action_invoke");
|
|
let result = instance.call("16s_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c79_l197_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c79_l197_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 198
|
|
fn c80_l198_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c80_l198_action_invoke");
|
|
let result = instance.call("32_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c80_l198_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c80_l198_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 200
|
|
fn c81_l200_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c81_l200_action_invoke");
|
|
let result = instance.call("8u_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c81_l200_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c81_l200_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 201
|
|
fn c82_l201_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c82_l201_action_invoke");
|
|
let result = instance.call("8s_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c82_l201_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c82_l201_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 202
|
|
fn c83_l202_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c83_l202_action_invoke");
|
|
let result = instance.call("16u_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c83_l202_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c83_l202_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 203
|
|
fn c84_l203_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c84_l203_action_invoke");
|
|
let result = instance.call("16s_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c84_l203_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c84_l203_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 204
|
|
fn c85_l204_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c85_l204_action_invoke");
|
|
let result = instance.call("32_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c85_l204_assert_trap() {
|
|
let mut instance = create_module_1();
|
|
let result = c85_l204_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 207
|
|
#[test]
|
|
fn c86_l207_assert_malformed() {
|
|
let wasm_binary = [40, 109, 101, 109, 111, 114, 121, 32, 49, 41, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 32, 111, 102, 102, 115, 101, 116, 61, 52, 50, 57, 52, 57, 54, 55, 50, 57, 54, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41, 41];
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
}
|
|
|
|
// Line 216
|
|
|
|
#[test]
|
|
fn test_module_1() {
|
|
let mut instance = create_module_1();
|
|
// We group the calls together
|
|
start_module_1(&mut instance);
|
|
c1_l104_action_invoke(&mut instance);
|
|
c2_l105_action_invoke(&mut instance);
|
|
c3_l106_action_invoke(&mut instance);
|
|
c4_l107_action_invoke(&mut instance);
|
|
c5_l108_action_invoke(&mut instance);
|
|
c6_l110_action_invoke(&mut instance);
|
|
c7_l111_action_invoke(&mut instance);
|
|
c8_l112_action_invoke(&mut instance);
|
|
c9_l113_action_invoke(&mut instance);
|
|
c10_l114_action_invoke(&mut instance);
|
|
c11_l116_action_invoke(&mut instance);
|
|
c12_l117_action_invoke(&mut instance);
|
|
c13_l118_action_invoke(&mut instance);
|
|
c14_l119_action_invoke(&mut instance);
|
|
c15_l120_action_invoke(&mut instance);
|
|
c16_l122_action_invoke(&mut instance);
|
|
c17_l123_action_invoke(&mut instance);
|
|
c18_l124_action_invoke(&mut instance);
|
|
c19_l125_action_invoke(&mut instance);
|
|
c20_l126_action_invoke(&mut instance);
|
|
c21_l128_action_invoke(&mut instance);
|
|
c22_l129_action_invoke(&mut instance);
|
|
c23_l130_action_invoke(&mut instance);
|
|
c24_l131_action_invoke(&mut instance);
|
|
c25_l132_action_invoke(&mut instance);
|
|
c26_l134_action_invoke(&mut instance);
|
|
c27_l135_action_invoke(&mut instance);
|
|
c28_l136_action_invoke(&mut instance);
|
|
c29_l137_action_invoke(&mut instance);
|
|
c30_l138_action_invoke(&mut instance);
|
|
c31_l140_action_invoke(&mut instance);
|
|
c32_l141_action_invoke(&mut instance);
|
|
c33_l142_action_invoke(&mut instance);
|
|
c34_l143_action_invoke(&mut instance);
|
|
c35_l144_action_invoke(&mut instance);
|
|
c36_l146_action_invoke(&mut instance);
|
|
c37_l147_action_invoke(&mut instance);
|
|
c38_l148_action_invoke(&mut instance);
|
|
c39_l149_action_invoke(&mut instance);
|
|
c40_l150_action_invoke(&mut instance);
|
|
c41_l152_action_invoke(&mut instance);
|
|
c42_l153_action_invoke(&mut instance);
|
|
c43_l154_action_invoke(&mut instance);
|
|
c44_l155_action_invoke(&mut instance);
|
|
c45_l156_action_invoke(&mut instance);
|
|
c46_l158_action_invoke(&mut instance);
|
|
c47_l159_action_invoke(&mut instance);
|
|
c48_l160_action_invoke(&mut instance);
|
|
c49_l161_action_invoke(&mut instance);
|
|
c50_l162_action_invoke(&mut instance);
|
|
c51_l164_action_invoke(&mut instance);
|
|
c52_l165_action_invoke(&mut instance);
|
|
c53_l166_action_invoke(&mut instance);
|
|
c54_l167_action_invoke(&mut instance);
|
|
c55_l168_action_invoke(&mut instance);
|
|
c56_l170_action_invoke(&mut instance);
|
|
c57_l171_action_invoke(&mut instance);
|
|
c58_l172_action_invoke(&mut instance);
|
|
c59_l173_action_invoke(&mut instance);
|
|
c60_l174_action_invoke(&mut instance);
|
|
c61_l176_action_invoke(&mut instance);
|
|
c62_l177_action_invoke(&mut instance);
|
|
c63_l178_action_invoke(&mut instance);
|
|
c64_l179_action_invoke(&mut instance);
|
|
c65_l180_action_invoke(&mut instance);
|
|
c66_l182_action_invoke(&mut instance);
|
|
c67_l183_action_invoke(&mut instance);
|
|
c68_l184_action_invoke(&mut instance);
|
|
c69_l185_action_invoke(&mut instance);
|
|
c70_l186_action_invoke(&mut instance);
|
|
c71_l188_action_invoke(&mut instance);
|
|
c72_l189_action_invoke(&mut instance);
|
|
c73_l190_action_invoke(&mut instance);
|
|
c74_l191_action_invoke(&mut instance);
|
|
}
|
|
fn create_module_2() -> Box<Instance> {
|
|
let module_str = "(module
|
|
(type (;0;) (func (param i32) (result i64)))
|
|
(type (;1;) (func (param i32)))
|
|
(func (;0;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_u)
|
|
(func (;1;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_u)
|
|
(func (;2;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_u offset=1)
|
|
(func (;3;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_u offset=2)
|
|
(func (;4;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_u offset=25)
|
|
(func (;5;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_s)
|
|
(func (;6;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_s)
|
|
(func (;7;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_s offset=1)
|
|
(func (;8;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_s offset=2)
|
|
(func (;9;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load8_s offset=25)
|
|
(func (;10;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_u)
|
|
(func (;11;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_u align=1)
|
|
(func (;12;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_u offset=1 align=1)
|
|
(func (;13;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_u offset=2)
|
|
(func (;14;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_u offset=25)
|
|
(func (;15;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_s)
|
|
(func (;16;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_s align=1)
|
|
(func (;17;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_s offset=1 align=1)
|
|
(func (;18;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_s offset=2)
|
|
(func (;19;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load16_s offset=25)
|
|
(func (;20;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_u)
|
|
(func (;21;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_u align=1)
|
|
(func (;22;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_u offset=1 align=1)
|
|
(func (;23;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_u offset=2 align=2)
|
|
(func (;24;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_u offset=25)
|
|
(func (;25;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_s)
|
|
(func (;26;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_s align=1)
|
|
(func (;27;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_s offset=1 align=1)
|
|
(func (;28;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_s offset=2 align=2)
|
|
(func (;29;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load32_s offset=25)
|
|
(func (;30;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load)
|
|
(func (;31;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load align=1)
|
|
(func (;32;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load offset=1 align=1)
|
|
(func (;33;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load offset=2 align=2)
|
|
(func (;34;) (type 0) (param i32) (result i64)
|
|
get_local 0
|
|
i64.load offset=25)
|
|
(func (;35;) (type 1) (param i32)
|
|
get_local 0
|
|
i64.load8_u offset=4294967295
|
|
drop)
|
|
(func (;36;) (type 1) (param i32)
|
|
get_local 0
|
|
i64.load8_s offset=4294967295
|
|
drop)
|
|
(func (;37;) (type 1) (param i32)
|
|
get_local 0
|
|
i64.load16_u offset=4294967295
|
|
drop)
|
|
(func (;38;) (type 1) (param i32)
|
|
get_local 0
|
|
i64.load16_s offset=4294967295
|
|
drop)
|
|
(func (;39;) (type 1) (param i32)
|
|
get_local 0
|
|
i64.load32_u offset=4294967295
|
|
drop)
|
|
(func (;40;) (type 1) (param i32)
|
|
get_local 0
|
|
i64.load32_s offset=4294967295
|
|
drop)
|
|
(func (;41;) (type 1) (param i32)
|
|
get_local 0
|
|
i64.load offset=4294967295
|
|
drop)
|
|
(memory (;0;) 1)
|
|
(export \"8u_good1\" (func 0))
|
|
(export \"8u_good2\" (func 1))
|
|
(export \"8u_good3\" (func 2))
|
|
(export \"8u_good4\" (func 3))
|
|
(export \"8u_good5\" (func 4))
|
|
(export \"8s_good1\" (func 5))
|
|
(export \"8s_good2\" (func 6))
|
|
(export \"8s_good3\" (func 7))
|
|
(export \"8s_good4\" (func 8))
|
|
(export \"8s_good5\" (func 9))
|
|
(export \"16u_good1\" (func 10))
|
|
(export \"16u_good2\" (func 11))
|
|
(export \"16u_good3\" (func 12))
|
|
(export \"16u_good4\" (func 13))
|
|
(export \"16u_good5\" (func 14))
|
|
(export \"16s_good1\" (func 15))
|
|
(export \"16s_good2\" (func 16))
|
|
(export \"16s_good3\" (func 17))
|
|
(export \"16s_good4\" (func 18))
|
|
(export \"16s_good5\" (func 19))
|
|
(export \"32u_good1\" (func 20))
|
|
(export \"32u_good2\" (func 21))
|
|
(export \"32u_good3\" (func 22))
|
|
(export \"32u_good4\" (func 23))
|
|
(export \"32u_good5\" (func 24))
|
|
(export \"32s_good1\" (func 25))
|
|
(export \"32s_good2\" (func 26))
|
|
(export \"32s_good3\" (func 27))
|
|
(export \"32s_good4\" (func 28))
|
|
(export \"32s_good5\" (func 29))
|
|
(export \"64_good1\" (func 30))
|
|
(export \"64_good2\" (func 31))
|
|
(export \"64_good3\" (func 32))
|
|
(export \"64_good4\" (func 33))
|
|
(export \"64_good5\" (func 34))
|
|
(export \"8u_bad\" (func 35))
|
|
(export \"8s_bad\" (func 36))
|
|
(export \"16u_bad\" (func 37))
|
|
(export \"16s_bad\" (func 38))
|
|
(export \"32u_bad\" (func 39))
|
|
(export \"32s_bad\" (func 40))
|
|
(export \"64_bad\" (func 41))
|
|
(data (;0;) (i32.const 0) \"abcdefghijklmnopqrstuvwxyz\"))
|
|
";
|
|
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_2(instance: &mut Instance) {
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
//instance.start();
|
|
}
|
|
|
|
// Line 355
|
|
fn c88_l355_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c88_l355_action_invoke");
|
|
let result = instance.call("8u_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(97 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 356
|
|
fn c89_l356_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c89_l356_action_invoke");
|
|
let result = instance.call("8u_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(97 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 357
|
|
fn c90_l357_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c90_l357_action_invoke");
|
|
let result = instance.call("8u_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(98 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 358
|
|
fn c91_l358_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c91_l358_action_invoke");
|
|
let result = instance.call("8u_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(99 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 359
|
|
fn c92_l359_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c92_l359_action_invoke");
|
|
let result = instance.call("8u_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(122 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 361
|
|
fn c93_l361_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c93_l361_action_invoke");
|
|
let result = instance.call("8s_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(97 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 362
|
|
fn c94_l362_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c94_l362_action_invoke");
|
|
let result = instance.call("8s_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(97 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 363
|
|
fn c95_l363_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c95_l363_action_invoke");
|
|
let result = instance.call("8s_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(98 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 364
|
|
fn c96_l364_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c96_l364_action_invoke");
|
|
let result = instance.call("8s_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(99 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 365
|
|
fn c97_l365_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c97_l365_action_invoke");
|
|
let result = instance.call("8s_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(122 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 367
|
|
fn c98_l367_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c98_l367_action_invoke");
|
|
let result = instance.call("16u_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(25185 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 368
|
|
fn c99_l368_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c99_l368_action_invoke");
|
|
let result = instance.call("16u_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(25185 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 369
|
|
fn c100_l369_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c100_l369_action_invoke");
|
|
let result = instance.call("16u_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(25442 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 370
|
|
fn c101_l370_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c101_l370_action_invoke");
|
|
let result = instance.call("16u_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(25699 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 371
|
|
fn c102_l371_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c102_l371_action_invoke");
|
|
let result = instance.call("16u_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(122 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 373
|
|
fn c103_l373_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c103_l373_action_invoke");
|
|
let result = instance.call("16s_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(25185 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 374
|
|
fn c104_l374_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c104_l374_action_invoke");
|
|
let result = instance.call("16s_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(25185 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 375
|
|
fn c105_l375_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c105_l375_action_invoke");
|
|
let result = instance.call("16s_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(25442 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 376
|
|
fn c106_l376_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c106_l376_action_invoke");
|
|
let result = instance.call("16s_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(25699 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 377
|
|
fn c107_l377_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c107_l377_action_invoke");
|
|
let result = instance.call("16s_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(122 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 379
|
|
fn c108_l379_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c108_l379_action_invoke");
|
|
let result = instance.call("32u_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(1684234849 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 380
|
|
fn c109_l380_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c109_l380_action_invoke");
|
|
let result = instance.call("32u_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(1684234849 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 381
|
|
fn c110_l381_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c110_l381_action_invoke");
|
|
let result = instance.call("32u_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(1701077858 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 382
|
|
fn c111_l382_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c111_l382_action_invoke");
|
|
let result = instance.call("32u_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(1717920867 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 383
|
|
fn c112_l383_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c112_l383_action_invoke");
|
|
let result = instance.call("32u_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(122 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 385
|
|
fn c113_l385_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c113_l385_action_invoke");
|
|
let result = instance.call("32s_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(1684234849 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 386
|
|
fn c114_l386_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c114_l386_action_invoke");
|
|
let result = instance.call("32s_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(1684234849 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 387
|
|
fn c115_l387_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c115_l387_action_invoke");
|
|
let result = instance.call("32s_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(1701077858 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 388
|
|
fn c116_l388_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c116_l388_action_invoke");
|
|
let result = instance.call("32s_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(1717920867 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 389
|
|
fn c117_l389_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c117_l389_action_invoke");
|
|
let result = instance.call("32s_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(122 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 391
|
|
fn c118_l391_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c118_l391_action_invoke");
|
|
let result = instance.call("64_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(7523094288207667809 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 392
|
|
fn c119_l392_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c119_l392_action_invoke");
|
|
let result = instance.call("64_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(7523094288207667809 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 393
|
|
fn c120_l393_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c120_l393_action_invoke");
|
|
let result = instance.call("64_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(7595434461045744482 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 394
|
|
fn c121_l394_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c121_l394_action_invoke");
|
|
let result = instance.call("64_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(7667774633883821155 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 395
|
|
fn c122_l395_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c122_l395_action_invoke");
|
|
let result = instance.call("64_good5", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(122 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 397
|
|
fn c123_l397_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c123_l397_action_invoke");
|
|
let result = instance.call("8u_good1", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 398
|
|
fn c124_l398_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c124_l398_action_invoke");
|
|
let result = instance.call("8u_good2", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 399
|
|
fn c125_l399_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c125_l399_action_invoke");
|
|
let result = instance.call("8u_good3", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 400
|
|
fn c126_l400_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c126_l400_action_invoke");
|
|
let result = instance.call("8u_good4", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 401
|
|
fn c127_l401_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c127_l401_action_invoke");
|
|
let result = instance.call("8u_good5", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 403
|
|
fn c128_l403_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c128_l403_action_invoke");
|
|
let result = instance.call("8s_good1", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 404
|
|
fn c129_l404_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c129_l404_action_invoke");
|
|
let result = instance.call("8s_good2", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 405
|
|
fn c130_l405_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c130_l405_action_invoke");
|
|
let result = instance.call("8s_good3", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 406
|
|
fn c131_l406_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c131_l406_action_invoke");
|
|
let result = instance.call("8s_good4", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 407
|
|
fn c132_l407_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c132_l407_action_invoke");
|
|
let result = instance.call("8s_good5", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 409
|
|
fn c133_l409_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c133_l409_action_invoke");
|
|
let result = instance.call("16u_good1", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 410
|
|
fn c134_l410_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c134_l410_action_invoke");
|
|
let result = instance.call("16u_good2", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 411
|
|
fn c135_l411_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c135_l411_action_invoke");
|
|
let result = instance.call("16u_good3", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 412
|
|
fn c136_l412_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c136_l412_action_invoke");
|
|
let result = instance.call("16u_good4", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 413
|
|
fn c137_l413_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c137_l413_action_invoke");
|
|
let result = instance.call("16u_good5", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 415
|
|
fn c138_l415_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c138_l415_action_invoke");
|
|
let result = instance.call("16s_good1", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 416
|
|
fn c139_l416_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c139_l416_action_invoke");
|
|
let result = instance.call("16s_good2", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 417
|
|
fn c140_l417_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c140_l417_action_invoke");
|
|
let result = instance.call("16s_good3", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 418
|
|
fn c141_l418_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c141_l418_action_invoke");
|
|
let result = instance.call("16s_good4", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 419
|
|
fn c142_l419_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c142_l419_action_invoke");
|
|
let result = instance.call("16s_good5", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 421
|
|
fn c143_l421_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c143_l421_action_invoke");
|
|
let result = instance.call("32u_good1", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 422
|
|
fn c144_l422_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c144_l422_action_invoke");
|
|
let result = instance.call("32u_good2", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 423
|
|
fn c145_l423_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c145_l423_action_invoke");
|
|
let result = instance.call("32u_good3", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 424
|
|
fn c146_l424_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c146_l424_action_invoke");
|
|
let result = instance.call("32u_good4", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 425
|
|
fn c147_l425_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c147_l425_action_invoke");
|
|
let result = instance.call("32u_good5", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 427
|
|
fn c148_l427_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c148_l427_action_invoke");
|
|
let result = instance.call("32s_good1", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 428
|
|
fn c149_l428_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c149_l428_action_invoke");
|
|
let result = instance.call("32s_good2", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 429
|
|
fn c150_l429_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c150_l429_action_invoke");
|
|
let result = instance.call("32s_good3", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 430
|
|
fn c151_l430_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c151_l430_action_invoke");
|
|
let result = instance.call("32s_good4", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 431
|
|
fn c152_l431_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c152_l431_action_invoke");
|
|
let result = instance.call("32s_good5", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 433
|
|
fn c153_l433_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c153_l433_action_invoke");
|
|
let result = instance.call("64_good1", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 434
|
|
fn c154_l434_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c154_l434_action_invoke");
|
|
let result = instance.call("64_good2", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 435
|
|
fn c155_l435_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c155_l435_action_invoke");
|
|
let result = instance.call("64_good3", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 436
|
|
fn c156_l436_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c156_l436_action_invoke");
|
|
let result = instance.call("64_good4", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 437
|
|
fn c157_l437_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c157_l437_action_invoke");
|
|
let result = instance.call("64_good5", &[Value::I32(65503 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 439
|
|
fn c158_l439_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c158_l439_action_invoke");
|
|
let result = instance.call("8u_good1", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 440
|
|
fn c159_l440_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c159_l440_action_invoke");
|
|
let result = instance.call("8u_good2", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 441
|
|
fn c160_l441_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c160_l441_action_invoke");
|
|
let result = instance.call("8u_good3", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 442
|
|
fn c161_l442_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c161_l442_action_invoke");
|
|
let result = instance.call("8u_good4", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 443
|
|
fn c162_l443_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c162_l443_action_invoke");
|
|
let result = instance.call("8u_good5", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 445
|
|
fn c163_l445_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c163_l445_action_invoke");
|
|
let result = instance.call("8s_good1", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 446
|
|
fn c164_l446_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c164_l446_action_invoke");
|
|
let result = instance.call("8s_good2", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 447
|
|
fn c165_l447_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c165_l447_action_invoke");
|
|
let result = instance.call("8s_good3", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 448
|
|
fn c166_l448_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c166_l448_action_invoke");
|
|
let result = instance.call("8s_good4", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 449
|
|
fn c167_l449_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c167_l449_action_invoke");
|
|
let result = instance.call("8s_good5", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 451
|
|
fn c168_l451_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c168_l451_action_invoke");
|
|
let result = instance.call("16u_good1", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 452
|
|
fn c169_l452_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c169_l452_action_invoke");
|
|
let result = instance.call("16u_good2", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 453
|
|
fn c170_l453_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c170_l453_action_invoke");
|
|
let result = instance.call("16u_good3", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 454
|
|
fn c171_l454_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c171_l454_action_invoke");
|
|
let result = instance.call("16u_good4", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 455
|
|
fn c172_l455_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c172_l455_action_invoke");
|
|
let result = instance.call("16u_good5", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 457
|
|
fn c173_l457_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c173_l457_action_invoke");
|
|
let result = instance.call("16s_good1", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 458
|
|
fn c174_l458_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c174_l458_action_invoke");
|
|
let result = instance.call("16s_good2", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 459
|
|
fn c175_l459_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c175_l459_action_invoke");
|
|
let result = instance.call("16s_good3", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 460
|
|
fn c176_l460_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c176_l460_action_invoke");
|
|
let result = instance.call("16s_good4", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 461
|
|
fn c177_l461_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c177_l461_action_invoke");
|
|
let result = instance.call("16s_good5", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 463
|
|
fn c178_l463_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c178_l463_action_invoke");
|
|
let result = instance.call("32u_good1", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 464
|
|
fn c179_l464_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c179_l464_action_invoke");
|
|
let result = instance.call("32u_good2", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 465
|
|
fn c180_l465_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c180_l465_action_invoke");
|
|
let result = instance.call("32u_good3", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 466
|
|
fn c181_l466_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c181_l466_action_invoke");
|
|
let result = instance.call("32u_good4", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 467
|
|
fn c182_l467_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c182_l467_action_invoke");
|
|
let result = instance.call("32u_good5", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 469
|
|
fn c183_l469_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c183_l469_action_invoke");
|
|
let result = instance.call("32s_good1", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 470
|
|
fn c184_l470_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c184_l470_action_invoke");
|
|
let result = instance.call("32s_good2", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 471
|
|
fn c185_l471_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c185_l471_action_invoke");
|
|
let result = instance.call("32s_good3", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 472
|
|
fn c186_l472_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c186_l472_action_invoke");
|
|
let result = instance.call("32s_good4", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 473
|
|
fn c187_l473_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c187_l473_action_invoke");
|
|
let result = instance.call("32s_good5", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 475
|
|
fn c188_l475_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c188_l475_action_invoke");
|
|
let result = instance.call("64_good1", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 476
|
|
fn c189_l476_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c189_l476_action_invoke");
|
|
let result = instance.call("64_good2", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 477
|
|
fn c190_l477_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c190_l477_action_invoke");
|
|
let result = instance.call("64_good3", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 478
|
|
fn c191_l478_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c191_l478_action_invoke");
|
|
let result = instance.call("64_good4", &[Value::I32(65504 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::I64(0 as i64))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 479
|
|
fn c192_l479_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c192_l479_action_invoke");
|
|
let result = instance.call("64_good5", &[Value::I32(65504 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c192_l479_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c192_l479_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 481
|
|
fn c193_l481_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c193_l481_action_invoke");
|
|
let result = instance.call("8u_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c193_l481_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c193_l481_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 482
|
|
fn c194_l482_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c194_l482_action_invoke");
|
|
let result = instance.call("8s_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c194_l482_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c194_l482_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 483
|
|
fn c195_l483_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c195_l483_action_invoke");
|
|
let result = instance.call("16u_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c195_l483_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c195_l483_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 484
|
|
fn c196_l484_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c196_l484_action_invoke");
|
|
let result = instance.call("16s_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c196_l484_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c196_l484_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 485
|
|
fn c197_l485_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c197_l485_action_invoke");
|
|
let result = instance.call("32u_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c197_l485_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c197_l485_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 486
|
|
fn c198_l486_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c198_l486_action_invoke");
|
|
let result = instance.call("32s_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c198_l486_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c198_l486_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 487
|
|
fn c199_l487_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c199_l487_action_invoke");
|
|
let result = instance.call("64_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c199_l487_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c199_l487_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 489
|
|
fn c200_l489_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c200_l489_action_invoke");
|
|
let result = instance.call("8u_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c200_l489_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c200_l489_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 490
|
|
fn c201_l490_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c201_l490_action_invoke");
|
|
let result = instance.call("8s_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c201_l490_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c201_l490_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 491
|
|
fn c202_l491_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c202_l491_action_invoke");
|
|
let result = instance.call("16u_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c202_l491_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c202_l491_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 492
|
|
fn c203_l492_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c203_l492_action_invoke");
|
|
let result = instance.call("16s_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c203_l492_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c203_l492_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 493
|
|
fn c204_l493_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c204_l493_action_invoke");
|
|
let result = instance.call("32u_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c204_l493_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c204_l493_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 494
|
|
fn c205_l494_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c205_l494_action_invoke");
|
|
let result = instance.call("32s_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c205_l494_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c205_l494_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 495
|
|
fn c206_l495_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c206_l495_action_invoke");
|
|
let result = instance.call("64_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c206_l495_assert_trap() {
|
|
let mut instance = create_module_2();
|
|
let result = c206_l495_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 499
|
|
|
|
#[test]
|
|
fn test_module_2() {
|
|
let mut instance = create_module_2();
|
|
// We group the calls together
|
|
start_module_2(&mut instance);
|
|
c88_l355_action_invoke(&mut instance);
|
|
c89_l356_action_invoke(&mut instance);
|
|
c90_l357_action_invoke(&mut instance);
|
|
c91_l358_action_invoke(&mut instance);
|
|
c92_l359_action_invoke(&mut instance);
|
|
c93_l361_action_invoke(&mut instance);
|
|
c94_l362_action_invoke(&mut instance);
|
|
c95_l363_action_invoke(&mut instance);
|
|
c96_l364_action_invoke(&mut instance);
|
|
c97_l365_action_invoke(&mut instance);
|
|
c98_l367_action_invoke(&mut instance);
|
|
c99_l368_action_invoke(&mut instance);
|
|
c100_l369_action_invoke(&mut instance);
|
|
c101_l370_action_invoke(&mut instance);
|
|
c102_l371_action_invoke(&mut instance);
|
|
c103_l373_action_invoke(&mut instance);
|
|
c104_l374_action_invoke(&mut instance);
|
|
c105_l375_action_invoke(&mut instance);
|
|
c106_l376_action_invoke(&mut instance);
|
|
c107_l377_action_invoke(&mut instance);
|
|
c108_l379_action_invoke(&mut instance);
|
|
c109_l380_action_invoke(&mut instance);
|
|
c110_l381_action_invoke(&mut instance);
|
|
c111_l382_action_invoke(&mut instance);
|
|
c112_l383_action_invoke(&mut instance);
|
|
c113_l385_action_invoke(&mut instance);
|
|
c114_l386_action_invoke(&mut instance);
|
|
c115_l387_action_invoke(&mut instance);
|
|
c116_l388_action_invoke(&mut instance);
|
|
c117_l389_action_invoke(&mut instance);
|
|
c118_l391_action_invoke(&mut instance);
|
|
c119_l392_action_invoke(&mut instance);
|
|
c120_l393_action_invoke(&mut instance);
|
|
c121_l394_action_invoke(&mut instance);
|
|
c122_l395_action_invoke(&mut instance);
|
|
c123_l397_action_invoke(&mut instance);
|
|
c124_l398_action_invoke(&mut instance);
|
|
c125_l399_action_invoke(&mut instance);
|
|
c126_l400_action_invoke(&mut instance);
|
|
c127_l401_action_invoke(&mut instance);
|
|
c128_l403_action_invoke(&mut instance);
|
|
c129_l404_action_invoke(&mut instance);
|
|
c130_l405_action_invoke(&mut instance);
|
|
c131_l406_action_invoke(&mut instance);
|
|
c132_l407_action_invoke(&mut instance);
|
|
c133_l409_action_invoke(&mut instance);
|
|
c134_l410_action_invoke(&mut instance);
|
|
c135_l411_action_invoke(&mut instance);
|
|
c136_l412_action_invoke(&mut instance);
|
|
c137_l413_action_invoke(&mut instance);
|
|
c138_l415_action_invoke(&mut instance);
|
|
c139_l416_action_invoke(&mut instance);
|
|
c140_l417_action_invoke(&mut instance);
|
|
c141_l418_action_invoke(&mut instance);
|
|
c142_l419_action_invoke(&mut instance);
|
|
c143_l421_action_invoke(&mut instance);
|
|
c144_l422_action_invoke(&mut instance);
|
|
c145_l423_action_invoke(&mut instance);
|
|
c146_l424_action_invoke(&mut instance);
|
|
c147_l425_action_invoke(&mut instance);
|
|
c148_l427_action_invoke(&mut instance);
|
|
c149_l428_action_invoke(&mut instance);
|
|
c150_l429_action_invoke(&mut instance);
|
|
c151_l430_action_invoke(&mut instance);
|
|
c152_l431_action_invoke(&mut instance);
|
|
c153_l433_action_invoke(&mut instance);
|
|
c154_l434_action_invoke(&mut instance);
|
|
c155_l435_action_invoke(&mut instance);
|
|
c156_l436_action_invoke(&mut instance);
|
|
c157_l437_action_invoke(&mut instance);
|
|
c158_l439_action_invoke(&mut instance);
|
|
c159_l440_action_invoke(&mut instance);
|
|
c160_l441_action_invoke(&mut instance);
|
|
c161_l442_action_invoke(&mut instance);
|
|
c162_l443_action_invoke(&mut instance);
|
|
c163_l445_action_invoke(&mut instance);
|
|
c164_l446_action_invoke(&mut instance);
|
|
c165_l447_action_invoke(&mut instance);
|
|
c166_l448_action_invoke(&mut instance);
|
|
c167_l449_action_invoke(&mut instance);
|
|
c168_l451_action_invoke(&mut instance);
|
|
c169_l452_action_invoke(&mut instance);
|
|
c170_l453_action_invoke(&mut instance);
|
|
c171_l454_action_invoke(&mut instance);
|
|
c172_l455_action_invoke(&mut instance);
|
|
c173_l457_action_invoke(&mut instance);
|
|
c174_l458_action_invoke(&mut instance);
|
|
c175_l459_action_invoke(&mut instance);
|
|
c176_l460_action_invoke(&mut instance);
|
|
c177_l461_action_invoke(&mut instance);
|
|
c178_l463_action_invoke(&mut instance);
|
|
c179_l464_action_invoke(&mut instance);
|
|
c180_l465_action_invoke(&mut instance);
|
|
c181_l466_action_invoke(&mut instance);
|
|
c182_l467_action_invoke(&mut instance);
|
|
c183_l469_action_invoke(&mut instance);
|
|
c184_l470_action_invoke(&mut instance);
|
|
c185_l471_action_invoke(&mut instance);
|
|
c186_l472_action_invoke(&mut instance);
|
|
c187_l473_action_invoke(&mut instance);
|
|
c188_l475_action_invoke(&mut instance);
|
|
c189_l476_action_invoke(&mut instance);
|
|
c190_l477_action_invoke(&mut instance);
|
|
c191_l478_action_invoke(&mut instance);
|
|
}
|
|
fn create_module_3() -> Box<Instance> {
|
|
let module_str = "(module
|
|
(type (;0;) (func (param i32) (result f32)))
|
|
(type (;1;) (func (param i32)))
|
|
(func (;0;) (type 0) (param i32) (result f32)
|
|
get_local 0
|
|
f32.load)
|
|
(func (;1;) (type 0) (param i32) (result f32)
|
|
get_local 0
|
|
f32.load align=1)
|
|
(func (;2;) (type 0) (param i32) (result f32)
|
|
get_local 0
|
|
f32.load offset=1 align=1)
|
|
(func (;3;) (type 0) (param i32) (result f32)
|
|
get_local 0
|
|
f32.load offset=2 align=2)
|
|
(func (;4;) (type 0) (param i32) (result f32)
|
|
get_local 0
|
|
f32.load offset=8)
|
|
(func (;5;) (type 1) (param i32)
|
|
get_local 0
|
|
f32.load offset=4294967295
|
|
drop)
|
|
(memory (;0;) 1)
|
|
(export \"32_good1\" (func 0))
|
|
(export \"32_good2\" (func 1))
|
|
(export \"32_good3\" (func 2))
|
|
(export \"32_good4\" (func 3))
|
|
(export \"32_good5\" (func 4))
|
|
(export \"32_bad\" (func 5))
|
|
(data (;0;) (i32.const 0) \"\\00\\00\\00\\00\\00\\00\\a0\\7f\\01\\00\\d0\\7f\"))
|
|
";
|
|
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_3(instance: &mut Instance) {
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
//instance.start();
|
|
}
|
|
|
|
// Line 523
|
|
fn c208_l523_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c208_l523_action_invoke");
|
|
let result = instance.call("32_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 524
|
|
fn c209_l524_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c209_l524_action_invoke");
|
|
let result = instance.call("32_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 525
|
|
fn c210_l525_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c210_l525_action_invoke");
|
|
let result = instance.call("32_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 526
|
|
fn c211_l526_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c211_l526_action_invoke");
|
|
let result = instance.call("32_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 527
|
|
fn c212_l527_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c212_l527_action_invoke");
|
|
let result = instance.call("32_good5", &[Value::I32(0 as i32)]);
|
|
let expected = f32::from_bits(2144337921);
|
|
if let Value::F32(result) = result.clone().unwrap().unwrap() {
|
|
assert!((result as f32).is_nan());
|
|
assert_eq!((result as f32).is_sign_positive(), (expected as f32).is_sign_positive());
|
|
} else {
|
|
panic!("Unexpected result type {:?}", result);
|
|
}
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 529
|
|
fn c213_l529_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c213_l529_action_invoke");
|
|
let result = instance.call("32_good1", &[Value::I32(65524 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 530
|
|
fn c214_l530_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c214_l530_action_invoke");
|
|
let result = instance.call("32_good2", &[Value::I32(65524 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 531
|
|
fn c215_l531_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c215_l531_action_invoke");
|
|
let result = instance.call("32_good3", &[Value::I32(65524 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 532
|
|
fn c216_l532_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c216_l532_action_invoke");
|
|
let result = instance.call("32_good4", &[Value::I32(65524 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 533
|
|
fn c217_l533_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c217_l533_action_invoke");
|
|
let result = instance.call("32_good5", &[Value::I32(65524 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 535
|
|
fn c218_l535_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c218_l535_action_invoke");
|
|
let result = instance.call("32_good1", &[Value::I32(65525 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 536
|
|
fn c219_l536_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c219_l536_action_invoke");
|
|
let result = instance.call("32_good2", &[Value::I32(65525 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 537
|
|
fn c220_l537_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c220_l537_action_invoke");
|
|
let result = instance.call("32_good3", &[Value::I32(65525 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 538
|
|
fn c221_l538_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c221_l538_action_invoke");
|
|
let result = instance.call("32_good4", &[Value::I32(65525 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F32((0.0f32).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 539
|
|
fn c222_l539_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c222_l539_action_invoke");
|
|
let result = instance.call("32_good5", &[Value::I32(65525 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c222_l539_assert_trap() {
|
|
let mut instance = create_module_3();
|
|
let result = c222_l539_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 541
|
|
fn c223_l541_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c223_l541_action_invoke");
|
|
let result = instance.call("32_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c223_l541_assert_trap() {
|
|
let mut instance = create_module_3();
|
|
let result = c223_l541_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 542
|
|
fn c224_l542_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c224_l542_action_invoke");
|
|
let result = instance.call("32_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c224_l542_assert_trap() {
|
|
let mut instance = create_module_3();
|
|
let result = c224_l542_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 546
|
|
|
|
#[test]
|
|
fn test_module_3() {
|
|
let mut instance = create_module_3();
|
|
// We group the calls together
|
|
start_module_3(&mut instance);
|
|
c208_l523_action_invoke(&mut instance);
|
|
c209_l524_action_invoke(&mut instance);
|
|
c210_l525_action_invoke(&mut instance);
|
|
c211_l526_action_invoke(&mut instance);
|
|
c212_l527_action_invoke(&mut instance);
|
|
c213_l529_action_invoke(&mut instance);
|
|
c214_l530_action_invoke(&mut instance);
|
|
c215_l531_action_invoke(&mut instance);
|
|
c216_l532_action_invoke(&mut instance);
|
|
c217_l533_action_invoke(&mut instance);
|
|
c218_l535_action_invoke(&mut instance);
|
|
c219_l536_action_invoke(&mut instance);
|
|
c220_l537_action_invoke(&mut instance);
|
|
c221_l538_action_invoke(&mut instance);
|
|
}
|
|
fn create_module_4() -> Box<Instance> {
|
|
let module_str = "(module
|
|
(type (;0;) (func (param i32) (result f64)))
|
|
(type (;1;) (func (param i32)))
|
|
(func (;0;) (type 0) (param i32) (result f64)
|
|
get_local 0
|
|
f64.load)
|
|
(func (;1;) (type 0) (param i32) (result f64)
|
|
get_local 0
|
|
f64.load align=1)
|
|
(func (;2;) (type 0) (param i32) (result f64)
|
|
get_local 0
|
|
f64.load offset=1 align=1)
|
|
(func (;3;) (type 0) (param i32) (result f64)
|
|
get_local 0
|
|
f64.load offset=2 align=2)
|
|
(func (;4;) (type 0) (param i32) (result f64)
|
|
get_local 0
|
|
f64.load offset=18)
|
|
(func (;5;) (type 1) (param i32)
|
|
get_local 0
|
|
f64.load offset=4294967295
|
|
drop)
|
|
(memory (;0;) 1)
|
|
(export \"64_good1\" (func 0))
|
|
(export \"64_good2\" (func 1))
|
|
(export \"64_good3\" (func 2))
|
|
(export \"64_good4\" (func 3))
|
|
(export \"64_good5\" (func 4))
|
|
(export \"64_bad\" (func 5))
|
|
(data (;0;) (i32.const 0) \"\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\f4\\7f\\01\\00\\00\\00\\00\\00\\fc\\7f\"))
|
|
";
|
|
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_4(instance: &mut Instance) {
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
//instance.start();
|
|
}
|
|
|
|
// Line 570
|
|
fn c226_l570_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c226_l570_action_invoke");
|
|
let result = instance.call("64_good1", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 571
|
|
fn c227_l571_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c227_l571_action_invoke");
|
|
let result = instance.call("64_good2", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 572
|
|
fn c228_l572_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c228_l572_action_invoke");
|
|
let result = instance.call("64_good3", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 573
|
|
fn c229_l573_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c229_l573_action_invoke");
|
|
let result = instance.call("64_good4", &[Value::I32(0 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 574
|
|
fn c230_l574_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c230_l574_action_invoke");
|
|
let result = instance.call("64_good5", &[Value::I32(0 as i32)]);
|
|
let expected = f64::from_bits(9222246136947933185);
|
|
if let Value::F64(result) = result.clone().unwrap().unwrap() {
|
|
assert!((result as f64).is_nan());
|
|
assert_eq!((result as f64).is_sign_positive(), (expected as f64).is_sign_positive());
|
|
} else {
|
|
panic!("Unexpected result type {:?}", result);
|
|
}
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 576
|
|
fn c231_l576_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c231_l576_action_invoke");
|
|
let result = instance.call("64_good1", &[Value::I32(65510 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 577
|
|
fn c232_l577_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c232_l577_action_invoke");
|
|
let result = instance.call("64_good2", &[Value::I32(65510 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 578
|
|
fn c233_l578_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c233_l578_action_invoke");
|
|
let result = instance.call("64_good3", &[Value::I32(65510 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 579
|
|
fn c234_l579_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c234_l579_action_invoke");
|
|
let result = instance.call("64_good4", &[Value::I32(65510 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 580
|
|
fn c235_l580_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c235_l580_action_invoke");
|
|
let result = instance.call("64_good5", &[Value::I32(65510 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 582
|
|
fn c236_l582_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c236_l582_action_invoke");
|
|
let result = instance.call("64_good1", &[Value::I32(65511 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 583
|
|
fn c237_l583_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c237_l583_action_invoke");
|
|
let result = instance.call("64_good2", &[Value::I32(65511 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 584
|
|
fn c238_l584_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c238_l584_action_invoke");
|
|
let result = instance.call("64_good3", &[Value::I32(65511 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 585
|
|
fn c239_l585_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c239_l585_action_invoke");
|
|
let result = instance.call("64_good4", &[Value::I32(65511 as i32)]);
|
|
assert_eq!(result, Ok(Some(Value::F64((0.0f64).to_bits()))));
|
|
result.map(|_| ())
|
|
}
|
|
|
|
// Line 586
|
|
fn c240_l586_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c240_l586_action_invoke");
|
|
let result = instance.call("64_good5", &[Value::I32(65511 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c240_l586_assert_trap() {
|
|
let mut instance = create_module_4();
|
|
let result = c240_l586_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 588
|
|
fn c241_l588_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c241_l588_action_invoke");
|
|
let result = instance.call("64_bad", &[Value::I32(0 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c241_l588_assert_trap() {
|
|
let mut instance = create_module_4();
|
|
let result = c241_l588_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
// Line 589
|
|
fn c242_l589_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
println!("Executing function {}", "c242_l589_action_invoke");
|
|
let result = instance.call("64_bad", &[Value::I32(1 as i32)]);
|
|
|
|
result.map(|_| ())
|
|
}
|
|
|
|
#[test]
|
|
fn c242_l589_assert_trap() {
|
|
let mut instance = create_module_4();
|
|
let result = c242_l589_action_invoke(&mut*instance);
|
|
assert!(result.is_err());
|
|
}
|
|
|
|
#[test]
|
|
fn test_module_4() {
|
|
let mut instance = create_module_4();
|
|
// We group the calls together
|
|
start_module_4(&mut instance);
|
|
c226_l570_action_invoke(&mut instance);
|
|
c227_l571_action_invoke(&mut instance);
|
|
c228_l572_action_invoke(&mut instance);
|
|
c229_l573_action_invoke(&mut instance);
|
|
c230_l574_action_invoke(&mut instance);
|
|
c231_l576_action_invoke(&mut instance);
|
|
c232_l577_action_invoke(&mut instance);
|
|
c233_l578_action_invoke(&mut instance);
|
|
c234_l579_action_invoke(&mut instance);
|
|
c235_l580_action_invoke(&mut instance);
|
|
c236_l582_action_invoke(&mut instance);
|
|
c237_l583_action_invoke(&mut instance);
|
|
c238_l584_action_invoke(&mut instance);
|
|
c239_l585_action_invoke(&mut instance);
|
|
}
|