wasm-bindgen/crates/webidl-tests/throws.rs
Alex Crichton 535aa3193c Attempt to fix compilation issues on CI
Can't reproduce the errors on Azure locally, but hopefully tweaking
generated code can get things to work.
2019-06-10 08:47:19 -07:00

28 lines
742 B
Rust

use wasm_bindgen_test::*;
include!(concat!(env!("OUT_DIR"), "/throws.rs"));
#[wasm_bindgen_test]
fn throws() {
assert!(Thang::new(0).is_err());
let thang = Thang::new(1).unwrap();
assert!(thang.ok_attr().is_ok());
assert!(thang.set_ok_attr(0).is_ok());
assert!(thang.err_attr().is_err());
assert!(thang.set_err_attr(0).is_err());
assert!(thang.ok_method().is_ok());
assert!(thang.err_method().is_err());
assert!(Thang::ok_static_method().is_ok());
assert!(Thang::err_static_method().is_err());
assert!(Thang::ok_static_attr().is_ok());
assert!(Thang::set_ok_static_attr(0).is_ok());
assert!(Thang::err_static_attr().is_err());
assert!(Thang::set_err_static_attr(0).is_err());
}