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

Side by Side Diff: test/mjsunit/asm/float64mul.js

Issue 2663243002: [asm] Fix lots of invalid asm.js tests (Closed)
Patch Set: Rebase Created 3 years, 10 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
« no previous file with comments | « test/mjsunit/asm/float64array-store-div.js ('k') | test/mjsunit/asm/if-cloning.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 function Module(stdlib, foreign, heap) { 5 function Module(stdlib, foreign, heap) {
6 "use asm"; 6 "use asm";
7 function f1(i) { 7 function f1(i) {
8 i = +i; 8 i = +i;
9 return +(i * -1); 9 return +(i * -1);
10 } 10 }
11 function f2(i) { 11 function f2(i) {
12 i = +i; 12 i = +i;
13 return +(-1 * i); 13 return +(-1. * i);
14 } 14 }
15 function f3(i) { 15 function f3(i) {
16 i = +i; 16 i = +i;
17 return +(-i); 17 return +(-i);
18 } 18 }
19 return { f1: f1, f2: f2, f3: f3 }; 19 return { f1: f1, f2: f2, f3: f3 };
20 } 20 }
21 21
22 var m = Module(this, {}, new ArrayBuffer(64 * 1024)); 22 var m = Module(this, {}, new ArrayBuffer(64 * 1024));
23 23
(...skipping 10 matching lines...) Expand all
34 assertEquals(-Infinity, 1 / m.f2(0)); 34 assertEquals(-Infinity, 1 / m.f2(0));
35 assertEquals(-Infinity, 1 / m.f3(0)); 35 assertEquals(-Infinity, 1 / m.f3(0));
36 assertEquals(-Infinity, m.f1(Infinity)); 36 assertEquals(-Infinity, m.f1(Infinity));
37 assertEquals(-Infinity, m.f2(Infinity)); 37 assertEquals(-Infinity, m.f2(Infinity));
38 assertEquals(-Infinity, m.f3(Infinity)); 38 assertEquals(-Infinity, m.f3(Infinity));
39 for (var i = -2147483648; i < 2147483648; i += 3999777) { 39 for (var i = -2147483648; i < 2147483648; i += 3999777) {
40 assertEquals(-i, m.f1(i)); 40 assertEquals(-i, m.f1(i));
41 assertEquals(-i, m.f2(i)); 41 assertEquals(-i, m.f2(i));
42 assertEquals(-i, m.f3(i)); 42 assertEquals(-i, m.f3(i));
43 } 43 }
OLDNEW
« no previous file with comments | « test/mjsunit/asm/float64array-store-div.js ('k') | test/mjsunit/asm/if-cloning.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698