Bug 1301029: Remove disabled memory exports tests in basic.js; r=luke
authorBenjamin Bouvier <benj@benj.me>
Wed, 07 Sep 2016 12:24:34 +0200
changeset 313029 77399867b2861839a93ef42dd17fad6e2652a049
parent 313028 7092faec0016abdaa7c0b06a75e80977ba9bda13
child 313030 5ad42aa79b3dbbfd54b54a4b2368d0677d01206d
push id20479
push userkwierso@gmail.com
push dateThu, 08 Sep 2016 01:08:46 +0000
treeherderfx-team@fb7c6b034329 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1301029
milestone51.0a1
Bug 1301029: Remove disabled memory exports tests in basic.js; r=luke MozReview-Commit-ID: 7jEt2U2hypp
js/src/jit-test/tests/wasm/basic.js
--- a/js/src/jit-test/tests/wasm/basic.js
+++ b/js/src/jit-test/tests/wasm/basic.js
@@ -129,67 +129,16 @@ assertErrorMessage(() => wasmEvalText('(
 
 // May OOM, but must not crash:
 try {
     wasmEvalText('(module (memory 65535))');
 } catch (e) {
     assertEq(String(e).indexOf("out of memory") != -1, true);
 }
 
-// Tests to reinstate pending a switch back to "real" memory exports:
-//
-//assertErrorMessage(() => wasmEvalText('(module (export "" memory))'), TypeError, /no memory section/);
-//
-//var buf = wasmEvalText('(module (memory 1) (export "" memory))');
-//assertEq(buf instanceof ArrayBuffer, true);
-//assertEq(buf.byteLength, 65536);
-//
-//assertErrorMessage(() => wasmEvalText('(module (memory 1) (export "a" memory) (export "a" memory))'), TypeError, /duplicate export/);
-//assertErrorMessage(() => wasmEvalText('(module (memory 1) (func) (export "a" memory) (export "a" 0))'), TypeError, /duplicate export/);
-//var {a, b} = wasmEvalText('(module (memory 1) (export "a" memory) (export "b" memory))');
-//assertEq(a instanceof ArrayBuffer, true);
-//assertEq(a, b);
-//
-//var obj = wasmEvalText('(module (memory 1) (func (result i32) (i32.const 42)) (func (nop)) (export "a" memory) (export "b" 0) (export "c" 1))');
-//assertEq(obj.a instanceof ArrayBuffer, true);
-//assertEq(obj.b instanceof Function, true);
-//assertEq(obj.c instanceof Function, true);
-//assertEq(obj.a.byteLength, 65536);
-//assertEq(obj.b(), 42);
-//assertEq(obj.c(), undefined);
-//
-//var obj = wasmEvalText('(module (memory 1) (func (result i32) (i32.const 42)) (export "" memory) (export "a" 0) (export "b" 0))');
-//assertEq(obj instanceof ArrayBuffer, true);
-//assertEq(obj.a instanceof Function, true);
-//assertEq(obj.b instanceof Function, true);
-//assertEq(obj.a, obj.b);
-//assertEq(obj.byteLength, 65536);
-//assertEq(obj.a(), 42);
-//
-//var buf = wasmEvalText('(module (memory 1 (segment 0 "")) (export "" memory))');
-//assertEq(new Uint8Array(buf)[0], 0);
-//
-//var buf = wasmEvalText('(module (memory 1 (segment 65536 "")) (export "" memory))');
-//assertEq(new Uint8Array(buf)[0], 0);
-//
-//var buf = wasmEvalText('(module (memory 1 (segment 0 "a")) (export "" memory))');
-//assertEq(new Uint8Array(buf)[0], 'a'.charCodeAt(0));
-//
-//var buf = wasmEvalText('(module (memory 1 (segment 0 "a") (segment 2 "b")) (export "" memory))');
-//assertEq(new Uint8Array(buf)[0], 'a'.charCodeAt(0));
-//assertEq(new Uint8Array(buf)[1], 0);
-//assertEq(new Uint8Array(buf)[2], 'b'.charCodeAt(0));
-//
-//var buf = wasmEvalText('(module (memory 1 (segment 65535 "c")) (export "" memory))');
-//assertEq(new Uint8Array(buf)[0], 0);
-//assertEq(new Uint8Array(buf)[65535], 'c'.charCodeAt(0));
-//
-//assertErrorMessage(() => wasmEvalText('(module (memory 1 (segment 65536 "a")) (export "" memory))'), TypeError, /data segment does not fit/);
-//assertErrorMessage(() => wasmEvalText('(module (memory 1 (segment 65535 "ab")) (export "" memory))'), TypeError, /data segment does not fit/);
-
 var buf = wasmEvalText('(module (memory 1) (export "memory" memory))').memory;
 assertEq(buf instanceof ArrayBuffer, true);
 assertEq(buf.byteLength, 65536);
 
 var obj = wasmEvalText('(module (memory 1) (func (result i32) (i32.const 42)) (func (nop)) (export "memory" memory) (export "b" 0) (export "c" 1))');
 assertEq(obj.memory instanceof ArrayBuffer, true);
 assertEq(obj.b instanceof Function, true);
 assertEq(obj.c instanceof Function, true);