Sha256: 41b2758762c91bd2d05995b1b8989651a6bf2e586ffad5597ff63f6d2dc6d755

Contents?: true

Size: 668 Bytes

Versions: 30

Compression:

Stored size: 668 Bytes

Contents

use wasm_bindgen::prelude::*;
use wasm_bindgen_test::*;

// This test is in the headless suite so that we can test the `externref` table
// implementation of `externref_heap_live_count` (as opposed to the JS `heap`
// implementation) in Firefox.
#[wasm_bindgen_test]
fn test_externref_heap_live_count() {
    let initial = wasm_bindgen::externref_heap_live_count();

    let after_alloc = {
        let _vals: Vec<_> = (0..10).map(JsValue::from).collect();
        wasm_bindgen::externref_heap_live_count()
    };

    let after_dealloc = wasm_bindgen::externref_heap_live_count();

    assert_eq!(initial, after_dealloc);
    assert_eq!(initial + 10, after_alloc);
}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wasmtime-23.0.2 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-22.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-21.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-20.0.2 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-20.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-18.0.3 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-17.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-17.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-16.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-15.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-15.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.89/tests/headless/externref_heap_live_count.rs
wasmtime-14.0.4 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs
wasmtime-14.0.3 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs
wasmtime-14.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs
wasmtime-14.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs
wasmtime-13.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs
wasmtime-12.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs
wasmtime-12.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs
wasmtime-11.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs
wasmtime-10.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/tests/headless/externref_heap_live_count.rs