2019-01-09 06:06:24 +00:00
|
|
|
// 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/align.wast
|
|
|
|
#![allow(
|
|
|
|
warnings,
|
|
|
|
dead_code
|
|
|
|
)]
|
|
|
|
use wabt::wat2wasm;
|
|
|
|
use std::{f32, f64};
|
|
|
|
|
|
|
|
use wasmer_runtime::types::Value;
|
2019-01-09 23:31:11 +00:00
|
|
|
use wasmer_runtime::{Instance, module::Module};
|
2019-01-09 06:06:24 +00:00
|
|
|
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))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i32.load8_s
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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 4
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_1() {
|
|
|
|
let mut instance = create_module_1();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_1(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_2() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i32.load8_u
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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 5
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_2() {
|
|
|
|
let mut instance = create_module_2();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_2(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_3() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i32.load16_s
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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 6
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_3() {
|
|
|
|
let mut instance = create_module_3();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_3(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_4() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i32.load16_u
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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 7
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_4() {
|
|
|
|
let mut instance = create_module_4();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_4(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_5() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i32.load
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_5(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 8
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_5() {
|
|
|
|
let mut instance = create_module_5();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_5(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_6() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.load8_s
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_6(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 9
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_6() {
|
|
|
|
let mut instance = create_module_6();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_6(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_7() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.load8_u
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_7(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 10
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_7() {
|
|
|
|
let mut instance = create_module_7();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_7(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_8() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.load16_s
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_8(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 11
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_8() {
|
|
|
|
let mut instance = create_module_8();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_8(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_9() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.load16_u
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_9(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 12
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_9() {
|
|
|
|
let mut instance = create_module_9();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_9(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_10() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_s
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_10(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 13
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_10() {
|
|
|
|
let mut instance = create_module_10();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_10(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_11() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_u
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_11(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 14
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_11() {
|
|
|
|
let mut instance = create_module_11();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_11(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_12() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.load
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_12(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 15
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_12() {
|
|
|
|
let mut instance = create_module_12();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_12(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_13() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
f32.load
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_13(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 16
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_13() {
|
|
|
|
let mut instance = create_module_13();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_13(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_14() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
f64.load
|
|
|
|
drop)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_14(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 17
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_14() {
|
|
|
|
let mut instance = create_module_14();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_14(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_15() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i32.const 1
|
|
|
|
i32.store8)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_15(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 18
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_15() {
|
|
|
|
let mut instance = create_module_15();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_15(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_16() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i32.const 1
|
|
|
|
i32.store16)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_16(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 19
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_16() {
|
|
|
|
let mut instance = create_module_16();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_16(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_17() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i32.const 1
|
|
|
|
i32.store)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_17(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 20
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_17() {
|
|
|
|
let mut instance = create_module_17();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_17(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_18() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.const 1
|
|
|
|
i64.store8)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_18(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 21
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_18() {
|
|
|
|
let mut instance = create_module_18();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_18(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_19() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.const 1
|
|
|
|
i64.store16)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_19(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 22
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_19() {
|
|
|
|
let mut instance = create_module_19();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_19(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_20() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.const 1
|
|
|
|
i64.store32)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_20(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 23
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_20() {
|
|
|
|
let mut instance = create_module_20();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_20(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_21() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
i64.const 1
|
|
|
|
i64.store)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_21(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 24
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_21() {
|
|
|
|
let mut instance = create_module_21();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_21(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_22() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
f32.const 0x1p+0 (;=1;)
|
|
|
|
f32.store)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_22(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 25
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_22() {
|
|
|
|
let mut instance = create_module_22();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_22(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_23() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func))
|
|
|
|
(func (;0;) (type 0)
|
|
|
|
i32.const 0
|
|
|
|
f64.const 0x1p+0 (;=1;)
|
|
|
|
f64.store)
|
|
|
|
(memory (;0;) 0))
|
|
|
|
";
|
|
|
|
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_23(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 28
|
|
|
|
#[test]
|
|
|
|
fn c23_l28_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 56, 95, 115, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 34
|
|
|
|
#[test]
|
|
|
|
fn c24_l34_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 56, 95, 115, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 40
|
|
|
|
#[test]
|
|
|
|
fn c25_l40_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 56, 95, 117, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 46
|
|
|
|
#[test]
|
|
|
|
fn c26_l46_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 56, 95, 117, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 52
|
|
|
|
#[test]
|
|
|
|
fn c27_l52_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 49, 54, 95, 115, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 58
|
|
|
|
#[test]
|
|
|
|
fn c28_l58_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 49, 54, 95, 115, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 64
|
|
|
|
#[test]
|
|
|
|
fn c29_l64_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 49, 54, 95, 117, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 70
|
|
|
|
#[test]
|
|
|
|
fn c30_l70_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 49, 54, 95, 117, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 76
|
|
|
|
#[test]
|
|
|
|
fn c31_l76_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 82
|
|
|
|
#[test]
|
|
|
|
fn c32_l82_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 108, 111, 97, 100, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 88
|
|
|
|
#[test]
|
|
|
|
fn c33_l88_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 56, 95, 115, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 94
|
|
|
|
#[test]
|
|
|
|
fn c34_l94_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 56, 95, 115, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 100
|
|
|
|
#[test]
|
|
|
|
fn c35_l100_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 56, 95, 117, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 106
|
|
|
|
#[test]
|
|
|
|
fn c36_l106_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 56, 95, 117, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 112
|
|
|
|
#[test]
|
|
|
|
fn c37_l112_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 49, 54, 95, 115, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 118
|
|
|
|
#[test]
|
|
|
|
fn c38_l118_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 49, 54, 95, 115, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 124
|
|
|
|
#[test]
|
|
|
|
fn c39_l124_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 49, 54, 95, 117, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 130
|
|
|
|
#[test]
|
|
|
|
fn c40_l130_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 49, 54, 95, 117, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 136
|
|
|
|
#[test]
|
|
|
|
fn c41_l136_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 51, 50, 95, 115, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 142
|
|
|
|
#[test]
|
|
|
|
fn c42_l142_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 51, 50, 95, 115, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 148
|
|
|
|
#[test]
|
|
|
|
fn c43_l148_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 51, 50, 95, 117, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 154
|
|
|
|
#[test]
|
|
|
|
fn c44_l154_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 51, 50, 95, 117, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 160
|
|
|
|
#[test]
|
|
|
|
fn c45_l160_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 166
|
|
|
|
#[test]
|
|
|
|
fn c46_l166_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 54, 52, 46, 108, 111, 97, 100, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 172
|
|
|
|
#[test]
|
|
|
|
fn c47_l172_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 102, 51, 50, 46, 108, 111, 97, 100, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 178
|
|
|
|
#[test]
|
|
|
|
fn c48_l178_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 102, 51, 50, 46, 108, 111, 97, 100, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 184
|
|
|
|
#[test]
|
|
|
|
fn c49_l184_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 102, 54, 52, 46, 108, 111, 97, 100, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 190
|
|
|
|
#[test]
|
|
|
|
fn c50_l190_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 102, 54, 52, 46, 108, 111, 97, 100, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 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 197
|
|
|
|
#[test]
|
|
|
|
fn c51_l197_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 51, 50, 46, 115, 116, 111, 114, 101, 56, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41, 41];
|
|
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 203
|
|
|
|
#[test]
|
|
|
|
fn c52_l203_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 51, 50, 46, 115, 116, 111, 114, 101, 56, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41, 41];
|
|
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 209
|
|
|
|
#[test]
|
|
|
|
fn c53_l209_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 51, 50, 46, 115, 116, 111, 114, 101, 49, 54, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41, 41];
|
|
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 215
|
|
|
|
#[test]
|
|
|
|
fn c54_l215_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 51, 50, 46, 115, 116, 111, 114, 101, 49, 54, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41, 41];
|
|
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 221
|
|
|
|
#[test]
|
|
|
|
fn c55_l221_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 51, 50, 46, 115, 116, 111, 114, 101, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41, 41];
|
|
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 227
|
|
|
|
#[test]
|
|
|
|
fn c56_l227_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 51, 50, 46, 115, 116, 111, 114, 101, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 41, 41, 41];
|
|
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 233
|
|
|
|
#[test]
|
|
|
|
fn c57_l233_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 54, 52, 46, 115, 116, 111, 114, 101, 56, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 54, 52, 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 239
|
|
|
|
#[test]
|
|
|
|
fn c58_l239_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 54, 52, 46, 115, 116, 111, 114, 101, 56, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 54, 52, 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 245
|
|
|
|
#[test]
|
|
|
|
fn c59_l245_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 54, 52, 46, 115, 116, 111, 114, 101, 49, 54, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 54, 52, 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 251
|
|
|
|
#[test]
|
|
|
|
fn c60_l251_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 54, 52, 46, 115, 116, 111, 114, 101, 49, 54, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 54, 52, 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 257
|
|
|
|
#[test]
|
|
|
|
fn c61_l257_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 54, 52, 46, 115, 116, 111, 114, 101, 51, 50, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 54, 52, 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 263
|
|
|
|
#[test]
|
|
|
|
fn c62_l263_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 54, 52, 46, 115, 116, 111, 114, 101, 51, 50, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 54, 52, 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 269
|
|
|
|
#[test]
|
|
|
|
fn c63_l269_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 54, 52, 46, 115, 116, 111, 114, 101, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 54, 52, 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 275
|
|
|
|
#[test]
|
|
|
|
fn c64_l275_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 105, 54, 52, 46, 115, 116, 111, 114, 101, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 105, 54, 52, 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 281
|
|
|
|
#[test]
|
|
|
|
fn c65_l281_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 102, 51, 50, 46, 115, 116, 111, 114, 101, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 102, 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 287
|
|
|
|
#[test]
|
|
|
|
fn c66_l287_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 102, 51, 50, 46, 115, 116, 111, 114, 101, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 102, 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 293
|
|
|
|
#[test]
|
|
|
|
fn c67_l293_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 102, 54, 52, 46, 115, 116, 111, 114, 101, 32, 97, 108, 105, 103, 110, 61, 48, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 102, 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 299
|
|
|
|
#[test]
|
|
|
|
fn c68_l299_assert_malformed() {
|
|
|
|
let wasm_binary = [40, 109, 111, 100, 117, 108, 101, 32, 40, 109, 101, 109, 111, 114, 121, 32, 48, 41, 32, 40, 102, 117, 110, 99, 32, 40, 102, 54, 52, 46, 115, 116, 111, 114, 101, 32, 97, 108, 105, 103, 110, 61, 55, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 32, 48, 41, 32, 40, 102, 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 306
|
|
|
|
#[test]
|
|
|
|
fn c69_l306_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 44, 1, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 310
|
|
|
|
#[test]
|
|
|
|
fn c70_l310_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 45, 1, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 314
|
|
|
|
#[test]
|
|
|
|
fn c71_l314_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 46, 2, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 318
|
|
|
|
#[test]
|
|
|
|
fn c72_l318_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 47, 2, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 322
|
|
|
|
#[test]
|
|
|
|
fn c73_l322_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 40, 3, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 326
|
|
|
|
#[test]
|
|
|
|
fn c74_l326_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 48, 1, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 330
|
|
|
|
#[test]
|
|
|
|
fn c75_l330_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 49, 1, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 334
|
|
|
|
#[test]
|
|
|
|
fn c76_l334_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 50, 2, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 338
|
|
|
|
#[test]
|
|
|
|
fn c77_l338_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 51, 2, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 342
|
|
|
|
#[test]
|
|
|
|
fn c78_l342_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 52, 3, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 346
|
|
|
|
#[test]
|
|
|
|
fn c79_l346_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 53, 3, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 350
|
|
|
|
#[test]
|
|
|
|
fn c80_l350_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 41, 4, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 354
|
|
|
|
#[test]
|
|
|
|
fn c81_l354_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 42, 3, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 358
|
|
|
|
#[test]
|
|
|
|
fn c82_l358_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 10, 1, 8, 0, 65, 0, 43, 4, 0, 26, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 363
|
|
|
|
#[test]
|
|
|
|
fn c83_l363_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 44, 1, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 367
|
|
|
|
#[test]
|
|
|
|
fn c84_l367_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 45, 1, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 371
|
|
|
|
#[test]
|
|
|
|
fn c85_l371_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 46, 2, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 375
|
|
|
|
#[test]
|
|
|
|
fn c86_l375_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 47, 2, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 379
|
|
|
|
#[test]
|
|
|
|
fn c87_l379_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 40, 3, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 383
|
|
|
|
#[test]
|
|
|
|
fn c88_l383_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 48, 1, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 387
|
|
|
|
#[test]
|
|
|
|
fn c89_l387_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 49, 1, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 391
|
|
|
|
#[test]
|
|
|
|
fn c90_l391_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 50, 2, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 395
|
|
|
|
#[test]
|
|
|
|
fn c91_l395_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 51, 2, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 399
|
|
|
|
#[test]
|
|
|
|
fn c92_l399_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 52, 3, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 403
|
|
|
|
#[test]
|
|
|
|
fn c93_l403_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 53, 3, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 407
|
|
|
|
#[test]
|
|
|
|
fn c94_l407_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 41, 4, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 411
|
|
|
|
#[test]
|
|
|
|
fn c95_l411_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 42, 3, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 415
|
|
|
|
#[test]
|
|
|
|
fn c96_l415_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 9, 1, 7, 0, 65, 0, 43, 4, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 420
|
|
|
|
#[test]
|
|
|
|
fn c97_l420_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 11, 1, 9, 0, 65, 0, 65, 0, 58, 1, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 424
|
|
|
|
#[test]
|
|
|
|
fn c98_l424_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 11, 1, 9, 0, 65, 0, 65, 0, 59, 2, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 428
|
|
|
|
#[test]
|
|
|
|
fn c99_l428_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 11, 1, 9, 0, 65, 0, 65, 0, 54, 3, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 432
|
|
|
|
#[test]
|
|
|
|
fn c100_l432_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 11, 1, 9, 0, 65, 0, 66, 0, 60, 1, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 436
|
|
|
|
#[test]
|
|
|
|
fn c101_l436_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 11, 1, 9, 0, 65, 0, 66, 0, 61, 2, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 440
|
|
|
|
#[test]
|
|
|
|
fn c102_l440_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 11, 1, 9, 0, 65, 0, 66, 0, 62, 3, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 444
|
|
|
|
#[test]
|
|
|
|
fn c103_l444_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 11, 1, 9, 0, 65, 0, 66, 0, 55, 4, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 448
|
|
|
|
#[test]
|
|
|
|
fn c104_l448_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 14, 1, 12, 0, 65, 0, 67, 0, 0, 0, 0, 56, 3, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 452
|
|
|
|
#[test]
|
|
|
|
fn c105_l452_assert_invalid() {
|
|
|
|
let wasm_binary = [0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 5, 3, 1, 0, 0, 10, 14, 1, 12, 0, 65, 0, 67, 0, 0, 0, 0, 57, 4, 0, 11];
|
|
|
|
let module = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
|
|
assert!(module.is_err(), "WASM should not compile as is invalid");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 458
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_23() {
|
|
|
|
let mut instance = create_module_23();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_23(&mut instance);
|
|
|
|
}
|
|
|
|
fn create_module_24() -> Box<Instance> {
|
|
|
|
let module_str = "(module
|
|
|
|
(type (;0;) (func (param i32) (result f32)))
|
|
|
|
(type (;1;) (func (param i32) (result f64)))
|
|
|
|
(type (;2;) (func (param i32 i32) (result i32)))
|
|
|
|
(type (;3;) (func (param i32 i32) (result i64)))
|
|
|
|
(func (;0;) (type 0) (param i32) (result f32)
|
|
|
|
(local f32 f32)
|
|
|
|
f32.const 0x1.4p+3 (;=10;)
|
|
|
|
set_local 1
|
|
|
|
block ;; label = @1
|
|
|
|
block ;; label = @2
|
|
|
|
block ;; label = @3
|
|
|
|
block ;; label = @4
|
|
|
|
block ;; label = @5
|
|
|
|
get_local 0
|
|
|
|
br_table 0 (;@5;) 1 (;@4;) 2 (;@3;) 3 (;@2;) 4 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f32.store
|
|
|
|
i32.const 0
|
|
|
|
f32.load
|
|
|
|
set_local 2
|
|
|
|
br 3 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f32.store align=1
|
|
|
|
i32.const 0
|
|
|
|
f32.load align=1
|
|
|
|
set_local 2
|
|
|
|
br 2 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f32.store align=2
|
|
|
|
i32.const 0
|
|
|
|
f32.load align=2
|
|
|
|
set_local 2
|
|
|
|
br 1 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f32.store
|
|
|
|
i32.const 0
|
|
|
|
f32.load
|
|
|
|
set_local 2
|
|
|
|
end
|
|
|
|
get_local 2)
|
|
|
|
(func (;1;) (type 1) (param i32) (result f64)
|
|
|
|
(local f64 f64)
|
|
|
|
f64.const 0x1.4p+3 (;=10;)
|
|
|
|
set_local 1
|
|
|
|
block ;; label = @1
|
|
|
|
block ;; label = @2
|
|
|
|
block ;; label = @3
|
|
|
|
block ;; label = @4
|
|
|
|
block ;; label = @5
|
|
|
|
block ;; label = @6
|
|
|
|
get_local 0
|
|
|
|
br_table 0 (;@6;) 1 (;@5;) 2 (;@4;) 3 (;@3;) 4 (;@2;) 5 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f64.store
|
|
|
|
i32.const 0
|
|
|
|
f64.load
|
|
|
|
set_local 2
|
|
|
|
br 4 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f64.store align=1
|
|
|
|
i32.const 0
|
|
|
|
f64.load align=1
|
|
|
|
set_local 2
|
|
|
|
br 3 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f64.store align=2
|
|
|
|
i32.const 0
|
|
|
|
f64.load align=2
|
|
|
|
set_local 2
|
|
|
|
br 2 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f64.store align=4
|
|
|
|
i32.const 0
|
|
|
|
f64.load align=4
|
|
|
|
set_local 2
|
|
|
|
br 1 (;@1;)
|
|
|
|
end
|
|
|
|
i32.const 0
|
|
|
|
get_local 1
|
|
|
|
f64.store
|
|
|
|
i32.const 0
|
|
|
|
f64.load
|
|
|
|
set_local 2
|
|
|
|
end
|
|
|
|
get_local 2)
|
|
|
|
(func (;2;) (type 2) (param i32 i32) (result i32)
|
|
|
|
(local i32 i32)
|
|
|
|
i32.const 10
|
|
|
|
set_local 2
|
|
|
|
block ;; label = @1
|
|
|
|
block ;; label = @2
|
|
|
|
block ;; label = @3
|
|
|
|
block ;; label = @4
|
|
|
|
block ;; label = @5
|
|
|
|
block ;; label = @6
|
|
|
|
get_local 0
|
|
|
|
br_table 0 (;@6;) 1 (;@5;) 2 (;@4;) 3 (;@3;) 4 (;@2;) 5 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @6
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store8
|
|
|
|
i32.const 0
|
|
|
|
i32.load8_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @6
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store8
|
|
|
|
i32.const 0
|
|
|
|
i32.load8_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 4 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @5
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store8
|
|
|
|
i32.const 0
|
|
|
|
i32.load8_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @5
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store8
|
|
|
|
i32.const 0
|
|
|
|
i32.load8_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 3 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @4
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store16
|
|
|
|
i32.const 0
|
|
|
|
i32.load16_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @4
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store16 align=1
|
|
|
|
i32.const 0
|
|
|
|
i32.load16_s align=1
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @4
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store16
|
|
|
|
i32.const 0
|
|
|
|
i32.load16_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 2 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @3
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store16
|
|
|
|
i32.const 0
|
|
|
|
i32.load16_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @3
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store16 align=1
|
|
|
|
i32.const 0
|
|
|
|
i32.load16_u align=1
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @3
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store16
|
|
|
|
i32.const 0
|
|
|
|
i32.load16_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 1 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store
|
|
|
|
i32.const 0
|
|
|
|
i32.load
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store align=1
|
|
|
|
i32.const 0
|
|
|
|
i32.load align=1
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store align=2
|
|
|
|
i32.const 0
|
|
|
|
i32.load align=2
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 4
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i32.store
|
|
|
|
i32.const 0
|
|
|
|
i32.load
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
end
|
|
|
|
get_local 3)
|
|
|
|
(func (;3;) (type 3) (param i32 i32) (result i64)
|
|
|
|
(local i64 i64)
|
|
|
|
i64.const 10
|
|
|
|
set_local 2
|
|
|
|
block ;; label = @1
|
|
|
|
block ;; label = @2
|
|
|
|
block ;; label = @3
|
|
|
|
block ;; label = @4
|
|
|
|
block ;; label = @5
|
|
|
|
block ;; label = @6
|
|
|
|
block ;; label = @7
|
|
|
|
block ;; label = @8
|
|
|
|
get_local 0
|
|
|
|
br_table 0 (;@8;) 1 (;@7;) 2 (;@6;) 3 (;@5;) 4 (;@4;) 5 (;@3;) 6 (;@2;) 7 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @8
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store8
|
|
|
|
i32.const 0
|
|
|
|
i64.load8_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @8
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store8
|
|
|
|
i32.const 0
|
|
|
|
i64.load8_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 6 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @7
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store8
|
|
|
|
i32.const 0
|
|
|
|
i64.load8_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @7
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store8
|
|
|
|
i32.const 0
|
|
|
|
i64.load8_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 5 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @6
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store16
|
|
|
|
i32.const 0
|
|
|
|
i64.load16_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @6
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store16 align=1
|
|
|
|
i32.const 0
|
|
|
|
i64.load16_s align=1
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @6
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store16
|
|
|
|
i32.const 0
|
|
|
|
i64.load16_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 4 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @5
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store16
|
|
|
|
i32.const 0
|
|
|
|
i64.load16_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @5
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store16 align=1
|
|
|
|
i32.const 0
|
|
|
|
i64.load16_u align=1
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @5
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store16
|
|
|
|
i32.const 0
|
|
|
|
i64.load16_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 3 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @4
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store32
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @4
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store32 align=1
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_s align=1
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @4
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store32 align=2
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_s align=2
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 4
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @4
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store32
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_s
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 2 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @3
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store32
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @3
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store32 align=1
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_u align=1
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @3
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store32 align=2
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_u align=2
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 4
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @3
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store32
|
|
|
|
i32.const 0
|
|
|
|
i64.load32_u
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
br 1 (;@1;)
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 0
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store
|
|
|
|
i32.const 0
|
|
|
|
i64.load
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store align=1
|
|
|
|
i32.const 0
|
|
|
|
i64.load align=1
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store align=2
|
|
|
|
i32.const 0
|
|
|
|
i64.load align=2
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 4
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store align=4
|
|
|
|
i32.const 0
|
|
|
|
i64.load align=4
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
get_local 1
|
|
|
|
i32.const 8
|
|
|
|
i32.eq
|
|
|
|
if ;; label = @2
|
|
|
|
i32.const 0
|
|
|
|
get_local 2
|
|
|
|
i64.store
|
|
|
|
i32.const 0
|
|
|
|
i64.load
|
|
|
|
set_local 3
|
|
|
|
end
|
|
|
|
end
|
|
|
|
get_local 3)
|
|
|
|
(memory (;0;) 1)
|
|
|
|
(export \"f32_align_switch\" (func 0))
|
|
|
|
(export \"f64_align_switch\" (func 1))
|
|
|
|
(export \"i32_align_switch\" (func 2))
|
|
|
|
(export \"i64_align_switch\" (func 3)))
|
|
|
|
";
|
|
|
|
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_24(instance: &mut Instance) {
|
|
|
|
// TODO Review is explicit start needed? Start now called in runtime::Instance::new()
|
|
|
|
//instance.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 802
|
|
|
|
fn c107_l802_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c107_l802_action_invoke");
|
|
|
|
let result = instance.call("f32_align_switch", &[Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F32((10.0f32).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 803
|
|
|
|
fn c108_l803_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c108_l803_action_invoke");
|
|
|
|
let result = instance.call("f32_align_switch", &[Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F32((10.0f32).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 804
|
|
|
|
fn c109_l804_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c109_l804_action_invoke");
|
|
|
|
let result = instance.call("f32_align_switch", &[Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F32((10.0f32).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 805
|
|
|
|
fn c110_l805_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c110_l805_action_invoke");
|
|
|
|
let result = instance.call("f32_align_switch", &[Value::I32(3 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F32((10.0f32).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 807
|
|
|
|
fn c111_l807_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c111_l807_action_invoke");
|
|
|
|
let result = instance.call("f64_align_switch", &[Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F64((10.0f64).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 808
|
|
|
|
fn c112_l808_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c112_l808_action_invoke");
|
|
|
|
let result = instance.call("f64_align_switch", &[Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F64((10.0f64).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 809
|
|
|
|
fn c113_l809_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c113_l809_action_invoke");
|
|
|
|
let result = instance.call("f64_align_switch", &[Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F64((10.0f64).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 810
|
|
|
|
fn c114_l810_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c114_l810_action_invoke");
|
|
|
|
let result = instance.call("f64_align_switch", &[Value::I32(3 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F64((10.0f64).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 811
|
|
|
|
fn c115_l811_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c115_l811_action_invoke");
|
|
|
|
let result = instance.call("f64_align_switch", &[Value::I32(4 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::F64((10.0f64).to_bits()))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 813
|
|
|
|
fn c116_l813_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c116_l813_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(0 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 814
|
|
|
|
fn c117_l814_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c117_l814_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(0 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 815
|
|
|
|
fn c118_l815_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c118_l815_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(1 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 816
|
|
|
|
fn c119_l816_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c119_l816_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(1 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 817
|
|
|
|
fn c120_l817_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c120_l817_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(2 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 818
|
|
|
|
fn c121_l818_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c121_l818_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(2 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 819
|
|
|
|
fn c122_l819_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c122_l819_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(2 as i32), Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 820
|
|
|
|
fn c123_l820_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c123_l820_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(3 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 821
|
|
|
|
fn c124_l821_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c124_l821_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(3 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 822
|
|
|
|
fn c125_l822_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c125_l822_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(3 as i32), Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 823
|
|
|
|
fn c126_l823_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c126_l823_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(4 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 824
|
|
|
|
fn c127_l824_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c127_l824_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(4 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 825
|
|
|
|
fn c128_l825_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c128_l825_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(4 as i32), Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 826
|
|
|
|
fn c129_l826_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c129_l826_action_invoke");
|
|
|
|
let result = instance.call("i32_align_switch", &[Value::I32(4 as i32), Value::I32(4 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I32(10 as i32))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 828
|
|
|
|
fn c130_l828_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c130_l828_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(0 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 829
|
|
|
|
fn c131_l829_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c131_l829_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(0 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 830
|
|
|
|
fn c132_l830_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c132_l830_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(1 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 831
|
|
|
|
fn c133_l831_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c133_l831_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(1 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 832
|
|
|
|
fn c134_l832_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c134_l832_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(2 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 833
|
|
|
|
fn c135_l833_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c135_l833_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(2 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 834
|
|
|
|
fn c136_l834_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c136_l834_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(2 as i32), Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 835
|
|
|
|
fn c137_l835_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c137_l835_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(3 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 836
|
|
|
|
fn c138_l836_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c138_l836_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(3 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 837
|
|
|
|
fn c139_l837_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c139_l837_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(3 as i32), Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 838
|
|
|
|
fn c140_l838_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c140_l838_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(4 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 839
|
|
|
|
fn c141_l839_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c141_l839_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(4 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 840
|
|
|
|
fn c142_l840_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c142_l840_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(4 as i32), Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 841
|
|
|
|
fn c143_l841_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c143_l841_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(4 as i32), Value::I32(4 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 842
|
|
|
|
fn c144_l842_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c144_l842_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(5 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 843
|
|
|
|
fn c145_l843_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c145_l843_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(5 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 844
|
|
|
|
fn c146_l844_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c146_l844_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(5 as i32), Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 845
|
|
|
|
fn c147_l845_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c147_l845_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(5 as i32), Value::I32(4 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 846
|
|
|
|
fn c148_l846_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c148_l846_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(6 as i32), Value::I32(0 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 847
|
|
|
|
fn c149_l847_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c149_l847_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(6 as i32), Value::I32(1 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 848
|
|
|
|
fn c150_l848_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c150_l848_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(6 as i32), Value::I32(2 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 849
|
|
|
|
fn c151_l849_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c151_l849_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(6 as i32), Value::I32(4 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Line 850
|
|
|
|
fn c152_l850_action_invoke(instance: &mut Instance) -> Result<(), String> {
|
|
|
|
println!("Executing function {}", "c152_l850_action_invoke");
|
|
|
|
let result = instance.call("i64_align_switch", &[Value::I32(6 as i32), Value::I32(8 as i32)]);
|
|
|
|
assert_eq!(result, Ok(Some(Value::I64(10 as i64))));
|
|
|
|
result.map(|_| ())
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_module_24() {
|
|
|
|
let mut instance = create_module_24();
|
|
|
|
// We group the calls together
|
|
|
|
start_module_24(&mut instance);
|
|
|
|
c107_l802_action_invoke(&mut instance);
|
|
|
|
c108_l803_action_invoke(&mut instance);
|
|
|
|
c109_l804_action_invoke(&mut instance);
|
|
|
|
c110_l805_action_invoke(&mut instance);
|
|
|
|
c111_l807_action_invoke(&mut instance);
|
|
|
|
c112_l808_action_invoke(&mut instance);
|
|
|
|
c113_l809_action_invoke(&mut instance);
|
|
|
|
c114_l810_action_invoke(&mut instance);
|
|
|
|
c115_l811_action_invoke(&mut instance);
|
|
|
|
c116_l813_action_invoke(&mut instance);
|
|
|
|
c117_l814_action_invoke(&mut instance);
|
|
|
|
c118_l815_action_invoke(&mut instance);
|
|
|
|
c119_l816_action_invoke(&mut instance);
|
|
|
|
c120_l817_action_invoke(&mut instance);
|
|
|
|
c121_l818_action_invoke(&mut instance);
|
|
|
|
c122_l819_action_invoke(&mut instance);
|
|
|
|
c123_l820_action_invoke(&mut instance);
|
|
|
|
c124_l821_action_invoke(&mut instance);
|
|
|
|
c125_l822_action_invoke(&mut instance);
|
|
|
|
c126_l823_action_invoke(&mut instance);
|
|
|
|
c127_l824_action_invoke(&mut instance);
|
|
|
|
c128_l825_action_invoke(&mut instance);
|
|
|
|
c129_l826_action_invoke(&mut instance);
|
|
|
|
c130_l828_action_invoke(&mut instance);
|
|
|
|
c131_l829_action_invoke(&mut instance);
|
|
|
|
c132_l830_action_invoke(&mut instance);
|
|
|
|
c133_l831_action_invoke(&mut instance);
|
|
|
|
c134_l832_action_invoke(&mut instance);
|
|
|
|
c135_l833_action_invoke(&mut instance);
|
|
|
|
c136_l834_action_invoke(&mut instance);
|
|
|
|
c137_l835_action_invoke(&mut instance);
|
|
|
|
c138_l836_action_invoke(&mut instance);
|
|
|
|
c139_l837_action_invoke(&mut instance);
|
|
|
|
c140_l838_action_invoke(&mut instance);
|
|
|
|
c141_l839_action_invoke(&mut instance);
|
|
|
|
c142_l840_action_invoke(&mut instance);
|
|
|
|
c143_l841_action_invoke(&mut instance);
|
|
|
|
c144_l842_action_invoke(&mut instance);
|
|
|
|
c145_l843_action_invoke(&mut instance);
|
|
|
|
c146_l844_action_invoke(&mut instance);
|
|
|
|
c147_l845_action_invoke(&mut instance);
|
|
|
|
c148_l846_action_invoke(&mut instance);
|
|
|
|
c149_l847_action_invoke(&mut instance);
|
|
|
|
c150_l848_action_invoke(&mut instance);
|
|
|
|
c151_l849_action_invoke(&mut instance);
|
|
|
|
c152_l850_action_invoke(&mut instance);
|
|
|
|
}
|