mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 04:21:21 +00:00
Merge pull request #708 from sendilkumarn/extends-arr
Adds Extends to TypedArrays
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use wasm_bindgen::prelude::*;
|
||||
use wasm_bindgen_test::*;
|
||||
use wasm_bindgen::JsCast;
|
||||
use js_sys::*;
|
||||
|
||||
macro_rules! each {
|
||||
@ -16,6 +17,19 @@ macro_rules! each {
|
||||
)
|
||||
}
|
||||
|
||||
macro_rules! test_inheritence {
|
||||
($arr:ident) => ({
|
||||
let arr = $arr::new(&JsValue::undefined());
|
||||
assert!(arr.is_instance_of::<$arr>());
|
||||
let _: &Object = arr.as_ref();
|
||||
assert!(arr.is_instance_of::<Object>());
|
||||
})
|
||||
}
|
||||
#[wasm_bindgen_test]
|
||||
fn inheritence() {
|
||||
each!(test_inheritence);
|
||||
}
|
||||
|
||||
macro_rules! test_undefined {
|
||||
($arr:ident) => ({
|
||||
let arr = $arr::new(&JsValue::undefined());
|
||||
|
Reference in New Issue
Block a user