mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-18 23:41:45 +03:00
d5b81595ec
First added in #161 this never ended up panning out, so let's remove the experimental suport which isn't actually used by anything today and hold off on any other changes until an RFC happens.
50 lines
1.1 KiB
Rust
50 lines
1.1 KiB
Rust
use wasm_bindgen_test::*;
|
|
|
|
pub mod same_function_different_locations_a {
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
#[wasm_bindgen(module = "tests/wasm/duplicates_a.js")]
|
|
extern {
|
|
pub fn foo();
|
|
}
|
|
}
|
|
|
|
pub mod same_function_different_locations_b {
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
#[wasm_bindgen(module = "tests/wasm/duplicates_a.js")]
|
|
extern {
|
|
pub fn foo();
|
|
}
|
|
}
|
|
|
|
#[wasm_bindgen_test]
|
|
fn same_function_different_locations() {
|
|
same_function_different_locations_a::foo();
|
|
same_function_different_locations_b::foo();
|
|
}
|
|
|
|
pub mod same_function_different_modules_a {
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
#[wasm_bindgen(module = "tests/wasm/duplicates_b.js")]
|
|
extern {
|
|
pub fn foo() -> bool;
|
|
}
|
|
}
|
|
|
|
pub mod same_function_different_modules_b {
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
#[wasm_bindgen(module = "tests/wasm/duplicates_c.js")]
|
|
extern {
|
|
pub fn foo() -> bool;
|
|
}
|
|
}
|
|
|
|
#[wasm_bindgen_test]
|
|
fn same_function_different_modules() {
|
|
assert!(same_function_different_modules_a::foo());
|
|
assert!(!same_function_different_modules_b::foo());
|
|
}
|