Port WebAssembly tests to wasm

This commit is contained in:
Alex Crichton
2018-07-20 17:09:50 -07:00
parent 9f7eea1e75
commit 5f87ed4cef
4 changed files with 10 additions and 71 deletions

View File

@ -0,0 +1,9 @@
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());
}