mod wast_runner; use wast_runner::WastRunner; macro_rules! testsuite { ($($name:ident => $file_name:literal,)*) => { $( #[test] fn $name() { use std::{fs, path::PathBuf}; let mut runner = WastRunner::new(); let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); path.push("tests/testsuite"); path.push($file_name); let string = fs::read_to_string(path).unwrap(); runner.run(&string); } )* } } testsuite! { address => "address.wast", align => "align.wast", binary_leb128 => "binary-leb128.wast", binary => "binary.wast", block => "block.wast", br => "br.wast", br_if => "br_if.wast", br_table => "br_table.wast", bulk => "bulk.wast", call => "call.wast", call_indirect => "call_indirect.wast", comments => "comments.wast", r#const => "const.wast", conversions => "conversions.wast", custom => "custom.wast", data => "data.wast", elem => "elem.wast", endianness => "endianness.wast", exports => "exports.wast", f32 => "f32.wast", f32_bitwise => "f32_bitwise.wast", f32_cmp => "f32_cmp.wast", f64 => "f64.wast", f64_bitwise => "f64_bitwise.wast", f64_cmp => "f64_cmp.wast", fac => "fac.wast", float_exprs => "float_exprs.wast", float_literals => "float_literals.wast", float_memory => "float_memory.wast", float_misc => "float_misc.wast", forward => "forward.wast", func => "func.wast", func_ptrs => "func_ptrs.wast", global => "global.wast", i32 => "i32.wast", i64 => "i64.wast", r#if => "if.wast", imports => "imports.wast", inline_module => "inline-module.wast", int_exprs => "int_exprs.wast", int_literals => "int_literals.wast", labels => "labels.wast", left_to_right => "left-to-right.wast", linking => "linking.wast", load => "load.wast", local_get => "local_get.wast", local_set => "local_set.wast", local_tee => "local_tee.wast", r#loop => "loop.wast", memory => "memory.wast", memory_copy => "memory_copy.wast", memory_fill => "memory_fill.wast", memory_grow => "memory_grow.wast", memory_init => "memory_init.wast", memory_redundancy => "memory_redundancy.wast", memory_size => "memory_size.wast", memory_trap => "memory_trap.wast", // names => "names.wast", nop => "nop.wast", obsolete_keywords => "obsolete-keywords.wast", ref_func => "ref_func.wast", ref_is_null => "ref_is_null.wast", ref_null => "ref_null.wast", r#return => "return.wast", select => "select.wast", /* simd_address => "simd/address.wast", simd_align => "simd/align.wast", simd_bit_shift => "simd/bit_shift.wast", simd_bitwise => "simd/bitwise.wast", simd_boolean => "simd/boolean.wast", simd_const => "simd/const.wast", simd_conversions => "simd/conversions.wast", simd_f32x4 => "simd/f32x4.wast", simd_f32x4_arith => "simd/f32x4-arith.wast", simd_f32x4_cmp => "simd/f32x4-cmp.wast", simd_f32x4_pmin_pmax => "simd/f32x4-pmin-pmax.wast", simd_f32x4_rounding => "simd/f32x4-rounding.wast", simd_f64x2 => "simd/f64x2.wast", simd_f64x2_arith => "simd/f64x2-arith.wast", simd_f64x2_cmp => "simd/f64x2-cmp.wast", simd_f64x2_pmin_pmax => "simd/f64x2-pmin-pmax.wast", simd_f64x2_rounding => "simd/f64x2-rounding.wast", simd_i16x8_arith => "simd/i16x8-arith.wast", simd_i16x8_arith2 => "simd/i16x8-arith2.wast", simd_i16x8_cmp => "simd/i16x8-cmp.wast", simd_i16x8_extadd_pairwise_i8x16 => "simd/i16x8-extadd-pairwise-i8x16.wast", simd_i16x8_extmul_i8x16 => "simd/i16x8-extmul-i8x16.wast", simd_i16x8_q15mulr_sat_s => "simd/i16x8-q15mulr-sat_s.wast", simd_i16x8_sat_arith => "simd/i16x8-sat-arith.wast", simd_i32x4_arith => "simd/i32x4-arith.wast", simd_i32x4_arith2 => "simd/i32x4-arith2.wast", simd_i32x4_cmp => "simd/i32x4-cmp.wast", simd_i32x4_dot_i16x8 => "simd/i32x4-dot_i16x8.wast", simd_i32x4_extadd_pairwise_i16x8 => "simd/i32x4-extadd-pairwise-i16x8.wast", simd_i32x4_extmul_i16x8 => "simd/i32x4-extmul-i16x8.wast", simd_i32x4_trunc_sat_f32x4 => "simd/i32x4-trunc-sat-f32x4.wast", simd_i32x4_trunc_sat_f64x2 => "simd/i32x4-trunc-sat-f64x2.wast", simd_i64x2_arith => "simd/i64x2-arith.wast", simd_i64x2_arith2 => "simd/i64x2-arith2.wast", simd_i64x2_cmp => "simd/i64x2-cmp.wast", simd_i64x2_extmul_i32x4 => "simd/i64x2-extmul-i32x4.wast", simd_i8x16_arith => "simd/i8x16-arith.wast", simd_i8x16_arith2 => "simd/i8x16-arith2.wast", simd_i8x16_cmp => "simd/i8x16-cmp.wast", simd_i8x16_sat_arith => "simd/i8x16-sat-arith.wast", simd_int_to_int_extend => "simd/int-to-int-extend.wast", simd_lane => "simd/lane.wast", simd_linking => "simd/linking.wast", simd_load => "simd/load.wast", simd_load16_lane => "simd/load16_lane.wast", simd_load32_lane => "simd/load32_lane.wast", simd_load64_lane => "simd/load64_lane.wast", simd_load8_lane => "simd/load8_lane.wast", simd_load_extend => "simd/load_extend.wast", simd_load_splat => "simd/load_splat.wast", simd_load_zero => "simd/load_zero.wast", simd_splat => "simd/splat.wast", simd_store => "simd/store.wast", simd_store16_lane => "simd/store16_lane.wast", simd_store32_lane => "simd/store32_lane.wast", simd_store64_lane => "simd/store64_lane.wast", simd_store8_lane => "simd/store8_lane.wast", */ skip_stack_guard_page => "skip-stack-guard-page.wast", stack => "stack.wast", start => "start.wast", store => "store.wast", switch => "switch.wast", table_sub => "table-sub.wast", table => "table.wast", table_copy => "table_copy.wast", table_fill => "table_fill.wast", table_get => "table_get.wast", table_grow => "table_grow.wast", table_init => "table_init.wast", table_set => "table_set.wast", table_size => "table_size.wast", token => "token.wast", traps => "traps.wast", r#type => "type.wast", unreachable => "unreachable.wast", unreached_invalid => "unreached-invalid.wast", unreached_valid => "unreached-valid.wast", unwind => "unwind.wast", utf8_custom_section_id => "utf8-custom-section-id.wast", utf8_import_field => "utf8-import-field.wast", utf8_import_module => "utf8-import-module.wast", utf8_invalid_encoding => "utf8-invalid-encoding.wast", }