wasm-bindgen/crates/js-sys/tests/wasm/WebAssembly.rs

10 lines
212 B
Rust
Raw Normal View History

2018-07-21 03:09:50 +03:00
use wasm_bindgen_test::*;
use js_sys::*;
#[wasm_bindgen_test]
fn validate() {
assert!(!WebAssembly::validate(ArrayBuffer::new(42).into()).unwrap());
assert!(WebAssembly::validate(2.into()).is_err());
}