mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-28 05:52:21 +03:00
parent
7a08da9205
commit
687412ec50
@ -306,4 +306,5 @@ fn array_inheritance() {
|
||||
let array = Array::new();
|
||||
assert!(array.is_instance_of::<Array>());
|
||||
assert!(array.is_instance_of::<Object>());
|
||||
let _: &Object = array.as_ref();
|
||||
}
|
||||
|
@ -41,4 +41,5 @@ fn arraybuffer_inheritance() {
|
||||
let buf = ArrayBuffer::new(4);
|
||||
assert!(buf.is_instance_of::<ArrayBuffer>());
|
||||
assert!(buf.is_instance_of::<Object>());
|
||||
let _: &Object = buf.as_ref();
|
||||
}
|
||||
|
@ -18,4 +18,5 @@ fn boolean_inheritance() {
|
||||
let b = Boolean::new(&JsValue::from(true));
|
||||
assert!(b.is_instance_of::<Boolean>());
|
||||
assert!(b.is_instance_of::<Object>());
|
||||
let _: &Object = b.as_ref();
|
||||
}
|
||||
|
@ -50,4 +50,6 @@ fn dataview_inheritance() {
|
||||
|
||||
assert!(v.is_instance_of::<DataView>());
|
||||
assert!(v.is_instance_of::<Object>());
|
||||
|
||||
let _: &Object = v.as_ref();
|
||||
}
|
||||
|
@ -413,4 +413,5 @@ fn date_inheritance() {
|
||||
let date = Date::new(&"August 19, 1975 23:15:30".into());
|
||||
assert!(date.is_instance_of::<Date>());
|
||||
assert!(date.is_instance_of::<Object>());
|
||||
let _: &Object = date.as_ref();
|
||||
}
|
||||
|
@ -42,4 +42,5 @@ fn error_inheritance() {
|
||||
let error = Error::new("test");
|
||||
assert!(error.is_instance_of::<Error>());
|
||||
assert!(error.is_instance_of::<Object>());
|
||||
let _: &Object = error.as_ref();
|
||||
}
|
||||
|
@ -52,4 +52,6 @@ fn evalerror_inheritance() {
|
||||
assert!(error.is_instance_of::<EvalError>());
|
||||
assert!(error.is_instance_of::<Error>());
|
||||
assert!(error.is_instance_of::<Object>());
|
||||
let _: &Error = error.as_ref();
|
||||
let _: &Object = error.as_ref();
|
||||
}
|
||||
|
@ -66,4 +66,5 @@ fn to_string() {
|
||||
fn function_inheritance() {
|
||||
assert!(MAX.is_instance_of::<Function>());
|
||||
assert!(MAX.is_instance_of::<Object>());
|
||||
let _: &Object = MAX.as_ref();
|
||||
}
|
||||
|
@ -93,4 +93,5 @@ fn map_inheritance() {
|
||||
let map = Map::new();
|
||||
assert!(map.is_instance_of::<Map>());
|
||||
assert!(map.is_instance_of::<Object>());
|
||||
let _: &Object = map.as_ref();
|
||||
}
|
||||
|
@ -111,4 +111,5 @@ fn number_inheritance() {
|
||||
let n = Number::new(&JsValue::from(42));
|
||||
assert!(n.is_instance_of::<Number>());
|
||||
assert!(n.is_instance_of::<Object>());
|
||||
let _: &Object = n.as_ref();
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ fn regexp_inheritance() {
|
||||
let re = RegExp::new(".", "");
|
||||
assert!(re.is_instance_of::<RegExp>());
|
||||
assert!(re.is_instance_of::<Object>());
|
||||
let _: &Object = re.as_ref();
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
|
@ -87,4 +87,5 @@ fn set_inheritance() {
|
||||
let set = Set::new(&JsValue::undefined());
|
||||
assert!(set.is_instance_of::<Set>());
|
||||
assert!(set.is_instance_of::<Object>());
|
||||
let _: &Object = set.as_ref();
|
||||
}
|
||||
|
@ -57,4 +57,5 @@ fn weakmap_inheritance() {
|
||||
let map = WeakMap::new();
|
||||
assert!(map.is_instance_of::<WeakMap>());
|
||||
assert!(map.is_instance_of::<Object>());
|
||||
let _: &Object = map.as_ref();
|
||||
}
|
||||
|
@ -47,4 +47,5 @@ fn weakset_inheritance() {
|
||||
let set = WeakSet::new();
|
||||
assert!(set.is_instance_of::<WeakSet>());
|
||||
assert!(set.is_instance_of::<Object>());
|
||||
let _: &Object = set.as_ref();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user