mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-17 22:51:47 +03:00
10 lines
212 B
Rust
10 lines
212 B
Rust
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());
|
|
}
|