summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/asm/asm-validation.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/asm/asm-validation.js')
-rw-r--r--deps/v8/test/mjsunit/asm/asm-validation.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/asm/asm-validation.js b/deps/v8/test/mjsunit/asm/asm-validation.js
index 0925d103ea..ed5b748aad 100644
--- a/deps/v8/test/mjsunit/asm/asm-validation.js
+++ b/deps/v8/test/mjsunit/asm/asm-validation.js
@@ -474,8 +474,26 @@ function assertValidAsm(func) {
assertFalse(o instanceof WebAssembly.Instance);
assertTrue(o instanceof Object);
assertTrue(o.__proto__ === Object.prototype);
+ var p = Object.getOwnPropertyDescriptor(o, "x")
+ assertTrue(p.writable);
+ assertTrue(p.enumerable);
+ assertTrue(p.configurable);
+ assertTrue(typeof o.x === 'function');
o.x = 5;
assertTrue(typeof o.x === 'number');
assertTrue(o.__single_function__ === undefined);
assertTrue(o.__foreign_init__ === undefined);
})();
+
+(function TestAsmExportOrderPreserved() {
+ function Module() {
+ "use asm";
+ function f() {}
+ function g() {}
+ return { a:f, b:g, x:f, c:g, d:f };
+ }
+ var m = Module();
+ assertValidAsm(Module);
+ var props = Object.getOwnPropertyNames(m);
+ assertEquals(["a","b","x","c","d"], props);
+})();