oden/third-party/vendor/wasm-bindgen/tests/wasm/should_panic.rs
2024-03-08 11:03:01 -08:00

17 lines
310 B
Rust

#[wasm_bindgen_test]
#[should_panic]
fn should_panic() {
panic!()
}
#[wasm_bindgen_test]
#[should_panic = "error message"]
fn should_panic_string() {
panic!("error message")
}
#[wasm_bindgen_test]
#[should_panic(expected = "error message")]
fn should_panic_expected() {
panic!("error message")
}