mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-15 04:23:12 +03:00
Add a test that Callback::forget
works
This commit is contained in:
parent
805738608d
commit
a68cdc594d
@ -51,3 +51,11 @@ pub mod snippets;
|
||||
pub mod modules;
|
||||
pub mod anyref_heap_live_count;
|
||||
pub mod strings;
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn closures_work() {
|
||||
let x = Closure::wrap(Box::new(|| {}) as Box<FnMut()>);
|
||||
drop(x);
|
||||
let x = Closure::wrap(Box::new(|| {}) as Box<FnMut()>);
|
||||
x.forget();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user