summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJasper-Bekkers <bekkers@gmail.com>2019-12-10 16:12:16 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-12-11 01:48:01 +0100
commit09f6c1d921a987ec2b20e0033d1bbbb36b0e22ef (patch)
tree94b7f1cb955ee63baccfee3beb66f686f9a5e50b /tests
parent7d61f36a5bfcfe2ea533f5edcae8bb6991683432 (diff)
Add support for wasm_import_module
Diffstat (limited to 'tests')
-rw-r--r--tests/expectations/tests/wasm-import-module.rs13
-rw-r--r--tests/headers/wasm-import-module.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/expectations/tests/wasm-import-module.rs b/tests/expectations/tests/wasm-import-module.rs
new file mode 100644
index 00000000..afbc5846
--- /dev/null
+++ b/tests/expectations/tests/wasm-import-module.rs
@@ -0,0 +1,13 @@
+/* automatically generated by rust-bindgen */
+
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
+
+#[link(wasm_import_module = "test-module")]
+extern "C" {
+ pub fn test_function();
+} \ No newline at end of file
diff --git a/tests/headers/wasm-import-module.h b/tests/headers/wasm-import-module.h
new file mode 100644
index 00000000..db4fe85c
--- /dev/null
+++ b/tests/headers/wasm-import-module.h
@@ -0,0 +1,3 @@
+// bindgen-flags: --wasm-import-module-name test-module
+
+void test_function(); \ No newline at end of file