From 70a767e2040037ab9568f21c600d54015467062c Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 1 Aug 2019 01:28:11 -0700 Subject: [PATCH] Improved exported memory tests --- Cargo.lock | 3 +++ lib/runtime-c-api/tests/test-exported-memory.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index c5a9d76e188..ab697e243ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -589,6 +589,9 @@ dependencies = [ name = "indexmap" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "inkwell" diff --git a/lib/runtime-c-api/tests/test-exported-memory.c b/lib/runtime-c-api/tests/test-exported-memory.c index 455de04020c..895b5c27cfb 100644 --- a/lib/runtime-c-api/tests/test-exported-memory.c +++ b/lib/runtime-c-api/tests/test-exported-memory.c @@ -42,8 +42,9 @@ int main() assert(export_length == 5); // Get the `memory` export. - wasmer_export_t *export = wasmer_exports_get(exports, 1); + wasmer_export_t *export = wasmer_exports_get(exports, 0); wasmer_import_export_kind kind = wasmer_export_kind(export); + printf("Wasmer import export kind: %d (Memory is %d)\n", kind, WASM_MEMORY); assert(kind == WASM_MEMORY); wasmer_byte_array export_name = wasmer_export_name(export);