]> git.lizzy.rs Git - rust.git/commitdiff
Check for the entry kind
authormaik <maik.klein@embark-studios.com>
Wed, 8 Jan 2020 09:05:44 +0000 (10:05 +0100)
committermaik <maik.klein@embark-studios.com>
Wed, 8 Jan 2020 09:05:44 +0000 (10:05 +0100)
src/test/run-make/wasm-export-all-symbols/verify.js

index a42aec45535a9ba01883d8aa389f0d9142310759..72db3356f5635146259f438b8019973eda1c906c 100644 (file)
@@ -14,13 +14,13 @@ for (const entry of list) {
   if (entry.kind == 'function'){
     nexports += 1;
   }
-  my_exports[entry.name] = true;
+  my_exports[entry.name] = entry.kind;
 }
 
-if (my_exports.foo === undefined)
+if (my_exports.foo != "function")
   throw new Error("`foo` wasn't defined");
 
-if (my_exports.FOO === undefined)
+if (my_exports.FOO != "global")
   throw new Error("`FOO` wasn't defined");
 
 if (my_exports.main === undefined) {