mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-17 06:21:36 +03:00
61fc8d2567
* js-sys: Return `f64` instead of `Number` * js-sys: remove trailing whitespace * js-sys: Ensure that all imported types derive Clone and Debug * js-sys: Imported functions should always take JS object arguments by-ref
10 lines
214 B
Rust
10 lines
214 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());
|
|
}
|