mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-28 20:21:35 +00:00
Add support for variadic arguments in WebIDL
This commit is contained in:
@ -90,6 +90,12 @@ fn optional_and_union_arguments() {
|
||||
assert_eq!(f.m_with_b_and_str_and_opt_bool("abc", false, "5", Some(true)), "string, abc, boolean, false, string, 5, boolean, true");
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn variadic() {
|
||||
let f = Variadic::new().unwrap();
|
||||
assert_eq!(f.sum(Box::new([1, 2, 3, 4, 5])), 15);
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn unforgeable_is_structural() {
|
||||
let f = Unforgeable::new().unwrap();
|
||||
|
Reference in New Issue
Block a user