Vendor dependencies
Let's see how I like this workflow.
This commit is contained in:
parent
34d1830413
commit
9c435dc440
7500 changed files with 1665121 additions and 99 deletions
57
vendor/wasm-bindgen/tests/wasm/duplicates.rs
vendored
Normal file
57
vendor/wasm-bindgen/tests/wasm/duplicates.rs
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
use wasm_bindgen_test::*;
|
||||
|
||||
pub mod same_function_different_locations_a {
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen(module = "tests/wasm/duplicates_a.js")]
|
||||
extern "C" {
|
||||
pub fn foo();
|
||||
pub static bar: JsValue;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod same_function_different_locations_b {
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen(module = "tests/wasm/duplicates_a.js")]
|
||||
extern "C" {
|
||||
pub fn foo();
|
||||
pub static bar: JsValue;
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn same_function_different_locations() {
|
||||
same_function_different_locations_a::foo();
|
||||
same_function_different_locations_b::foo();
|
||||
assert_eq!(*same_function_different_locations_a::bar, 3);
|
||||
assert_eq!(*same_function_different_locations_a::bar, 3);
|
||||
}
|
||||
|
||||
pub mod same_function_different_modules_a {
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen(module = "tests/wasm/duplicates_b.js")]
|
||||
extern "C" {
|
||||
pub fn foo() -> bool;
|
||||
pub static bar: JsValue;
|
||||
}
|
||||
}
|
||||
|
||||
pub mod same_function_different_modules_b {
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen(module = "tests/wasm/duplicates_c.js")]
|
||||
extern "C" {
|
||||
pub fn foo() -> bool;
|
||||
pub static bar: JsValue;
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn same_function_different_modules() {
|
||||
assert!(same_function_different_modules_a::foo());
|
||||
assert!(!same_function_different_modules_b::foo());
|
||||
assert_eq!(*same_function_different_modules_a::bar, 4);
|
||||
assert_eq!(*same_function_different_modules_b::bar, 5);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue