Sha256: a7ce23aac1cb7abb83ad92dfaec751cd89f8e5047043667f6cc37d36bbd8cfc3

Contents?: true

Size: 603 Bytes

Versions: 11

Compression:

Stored size: 603 Bytes

Contents

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();
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
wasmtime-23.0.2 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-22.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-21.0.1 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-20.0.2 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-20.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-18.0.3 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-17.0.1 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-17.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-16.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-15.0.1 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs
wasmtime-15.0.0 ./ext/cargo-vendor/js-sys-0.3.66/tests/wasm/Boolean.rs