mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-26 19:21:35 +00:00
Adding in to_vec method for typed arrays (#1844)
* Adding in to_vec method for typed arrays * Fixing type error
This commit is contained in:
@ -131,3 +131,10 @@ fn copy_to() {
|
||||
assert_eq!(*i, 5);
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn to_vec() {
|
||||
let array = Int32Array::new(&10.into());
|
||||
array.fill(5, 0, 10);
|
||||
assert_eq!(array.to_vec(), vec![5, 5, 5, 5, 5, 5, 5, 5, 5, 5]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user