Add extends attributes for several types

Part of #670
This commit is contained in:
Andrew Chin
2018-08-08 22:49:06 -04:00
parent 505037ffae
commit cc8095d065
14 changed files with 118 additions and 0 deletions

View File

@ -1,5 +1,6 @@
use wasm_bindgen::JsValue;
use wasm_bindgen_test::*;
use wasm_bindgen::JsCast;
use js_sys::*;
#[wasm_bindgen_test]
@ -11,3 +12,10 @@ fn new_undefined() {
fn new_truely() {
assert_eq!(Boolean::new(&JsValue::from("foo")).value_of(), true);
}
#[wasm_bindgen_test]
fn boolean_inheritance() {
let b = Boolean::new(&JsValue::from(true));
assert!(b.is_instance_of::<Boolean>());
assert!(b.is_instance_of::<Object>());
}