Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: test/mjsunit/wasm/asm-wasm-literals.js

Issue 2771183002: [wasm][asm.js] Fix and enable several asm.js tests with the new parser. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --validate-asm --allow-natives-syntax 5 // Flags: --validate-asm --allow-natives-syntax --fast-validate-asm
6 6
7 function RunAsmJsTest(asmfunc, expect) { 7 function RunAsmJsTest(asmfunc, expect) {
8 var asm_source = asmfunc.toString(); 8 var asm_source = asmfunc.toString();
9 var nonasm_source = asm_source.replace(new RegExp("use asm"), ""); 9 var nonasm_source = asm_source.replace(new RegExp("use asm"), "");
10 var stdlib = {Math: Math}; 10 var stdlib = {Math: Math};
11 11
12 print("Testing " + asmfunc.name + " (js)..."); 12 print("Testing " + asmfunc.name + " (js)...");
13 var js_module = eval("(" + nonasm_source + ")")(stdlib); 13 var js_module = eval("(" + nonasm_source + ")")(stdlib);
14 expect(js_module); 14 expect(js_module);
15 15
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // TODO(bradnelson): fails validation of F32 literals somehow. 253 // TODO(bradnelson): fails validation of F32 literals somehow.
254 RunAsmJsTest(ManyF32a, function(module) { 254 RunAsmJsTest(ManyF32a, function(module) {
255 assertEquals(2.0999999917333043e-24, module.k1()); 255 assertEquals(2.0999999917333043e-24, module.k1());
256 assertEquals(2.099999868734112e-19, module.k2()); 256 assertEquals(2.099999868734112e-19, module.k2());
257 assertEquals(2.099999997029825e-14, module.k3()); 257 assertEquals(2.099999997029825e-14, module.k3());
258 assertEquals(2.099999951710174e-9, module.k4()); 258 assertEquals(2.099999951710174e-9, module.k4());
259 assertEquals(0.0002099999983329326, module.k5()); 259 assertEquals(0.0002099999983329326, module.k5());
260 assertEquals(21.399999618530273, module.k6()); 260 assertEquals(21.399999618530273, module.k6());
261 }); 261 });
262 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698