.cargo/vendor/wasm-bindgen/tests/wasm/should_panic.rs
raw| 1 | #[wasm_bindgen_test] |
| 2 | #[should_panic] |
| 3 | fn should_panic() { |
| 4 | panic!() |
| 5 | } |
| 6 | |
| 7 | #[wasm_bindgen_test] |
| 8 | #[should_panic = "error message"] |
| 9 | fn should_panic_string() { |
| 10 | panic!("error message") |
| 11 | } |
| 12 | |
| 13 | #[wasm_bindgen_test] |
| 14 | #[should_panic(expected = "error message")] |
| 15 | fn should_panic_expected() { |
| 16 | panic!("error message") |
| 17 | } |