#![cfg(all(feature = "std", not(target_family = "wasm"), not(miri)))]
mod isa_dtypes;
use std::panic::{AssertUnwindSafe, catch_unwind};
#[test]
fn neon_pin_sweeps_every_dtype_ladder() {
unsafe {
std::env::set_var("GEMMKIT_REQUIRE_ISA", "neon");
}
let expect_panic = !cfg!(target_arch = "aarch64");
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_eq!(
panicked, expect_panic,
"GEMMKIT_REQUIRE_ISA=neon dtype {name}: panicked={panicked}, expected={expect_panic}"
);
}
}