Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
25
third-party/vendor/js-sys/tests/wasm/Boolean.rs
vendored
Normal file
25
third-party/vendor/js-sys/tests/wasm/Boolean.rs
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
use js_sys::*;
|
||||
use wasm_bindgen::JsCast;
|
||||
use wasm_bindgen::JsValue;
|
||||
use wasm_bindgen_test::*;
|
||||
|
||||
#[allow(deprecated)]
|
||||
#[wasm_bindgen_test]
|
||||
fn new_undefined() {
|
||||
assert_eq!(Boolean::new(&JsValue::undefined()).value_of(), false);
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
#[wasm_bindgen_test]
|
||||
fn new_truly() {
|
||||
assert_eq!(Boolean::new(&JsValue::from("foo")).value_of(), true);
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
#[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>());
|
||||
let _: &Object = b.as_ref();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue