diff options
Diffstat (limited to 'vendor/wasm-bindgen/tests/wasm/should_panic.rs')
-rw-r--r-- | vendor/wasm-bindgen/tests/wasm/should_panic.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/wasm-bindgen/tests/wasm/should_panic.rs b/vendor/wasm-bindgen/tests/wasm/should_panic.rs new file mode 100644 index 000000000..6c0788b27 --- /dev/null +++ b/vendor/wasm-bindgen/tests/wasm/should_panic.rs @@ -0,0 +1,17 @@ +#[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") +} |