#![cfg(all(feature = "std", not(target_family = "wasm"), not(miri)))]
mod isa_dtypes;
use std::panic::{AssertUnwindSafe, catch_unwind};
#[test]
fn wasm_pin_sweeps_every_dtype_ladder() {
unsafe {
std::env::set_var("GEMMKIT_REQUIRE_ISA", "wasm");
}
let prev = std::panic::take_hook();
std::panic::set_hook(Box::new(|_| {}));
let results: Vec<(&str, bool)> = isa_dtypes::dtype_cases()
.into_iter()
.map(|(name, f)| (name, catch_unwind(AssertUnwindSafe(f)).is_err()))
.collect();
std::panic::set_hook(prev);
for (name, panicked) in results {
assert!(
panicked,
"GEMMKIT_REQUIRE_ISA=wasm dtype {name} must panic on a native target"
);
}
}