mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-15 23:25:41 +00:00
36 lines
1.1 KiB
Rust
36 lines
1.1 KiB
Rust
// Rust test file autogenerated with cargo build (build/spectests.rs).
|
|
// Please do NOT modify it by hand, as it will be reset on next build.
|
|
// Test based on spectests/token.wast
|
|
#![allow(
|
|
warnings,
|
|
dead_code
|
|
)]
|
|
use wabt::wat2wasm;
|
|
use std::{f32, f64};
|
|
|
|
use wasmer_runtime::types::Value;
|
|
use wasmer_runtime::{Instance, module::Module};
|
|
use wasmer_clif_backend::CraneliftCompiler;
|
|
|
|
use crate::spectests::_common::{
|
|
spectest_importobject,
|
|
NaNCheck,
|
|
};
|
|
|
|
|
|
// Line 4
|
|
#[test]
|
|
fn c0_l4_assert_malformed() {
|
|
let wasm_binary = [40, 102, 117, 110, 99, 32, 40, 100, 114, 111, 112, 32, 40, 105, 51, 50, 46, 99, 111, 110, 115, 116, 48, 41, 41, 41];
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
}
|
|
|
|
// Line 8
|
|
#[test]
|
|
fn c1_l8_assert_malformed() {
|
|
let wasm_binary = [40, 102, 117, 110, 99, 32, 98, 114, 32, 48, 100, 114, 111, 112, 41];
|
|
let compilation = wasmer_runtime::compile(&wasm_binary, &CraneliftCompiler::new());
|
|
assert!(compilation.is_err(), "WASM should not compile as is malformed");
|
|
}
|