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

Side by Side Diff: test/mjsunit/math-floor-part1.js

Issue 124573002: Upgrade Number constructor to ES6. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Various code improvements Created 6 years, 11 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 | « src/v8natives.js ('k') | test/mjsunit/math-round.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 assertEquals(-Infinity, ifloor(-0)); 53 assertEquals(-Infinity, ifloor(-0));
54 assertEquals(-Infinity, ifloor(-0)); 54 assertEquals(-Infinity, ifloor(-0));
55 assertEquals(-Infinity, ifloor(-0)); 55 assertEquals(-Infinity, ifloor(-0));
56 %OptimizeFunctionOnNextCall(ifloor); 56 %OptimizeFunctionOnNextCall(ifloor);
57 assertEquals(-Infinity, ifloor(-0)); 57 assertEquals(-Infinity, ifloor(-0));
58 58
59 testFloor(0, 0.1); 59 testFloor(0, 0.1);
60 testFloor(0, 0.49999999999999994); 60 testFloor(0, 0.49999999999999994);
61 testFloor(0, 0.5); 61 testFloor(0, 0.5);
62 testFloor(0, 0.7); 62 testFloor(0, 0.7);
63 testFloor(0, 1.0 - Number.EPSILON);
63 testFloor(-1, -0.1); 64 testFloor(-1, -0.1);
64 testFloor(-1, -0.49999999999999994); 65 testFloor(-1, -0.49999999999999994);
65 testFloor(-1, -0.5); 66 testFloor(-1, -0.5);
66 testFloor(-1, -0.7); 67 testFloor(-1, -0.7);
67 testFloor(1, 1); 68 testFloor(1, 1);
68 testFloor(1, 1.1); 69 testFloor(1, 1.1);
70 testFloor(1, 1.0 + Number.EPSILON);
69 testFloor(1, 1.5); 71 testFloor(1, 1.5);
70 testFloor(1, 1.7); 72 testFloor(1, 1.7);
71 testFloor(-1, -1); 73 testFloor(-1, -1);
74 testFloor(-1, -1 + Number.EPSILON);
75 testFloor(-2, -1 - Number.EPSILON);
72 testFloor(-2, -1.1); 76 testFloor(-2, -1.1);
73 testFloor(-2, -1.5); 77 testFloor(-2, -1.5);
74 testFloor(-2, -1.7); 78 testFloor(-2, -1.7);
75 79
76 testFloor(0, Number.MIN_VALUE); 80 testFloor(0, Number.MIN_VALUE);
77 testFloor(-1, -Number.MIN_VALUE); 81 testFloor(-1, -Number.MIN_VALUE);
78 testFloor(Number.MAX_VALUE, Number.MAX_VALUE); 82 testFloor(Number.MAX_VALUE, Number.MAX_VALUE);
79 testFloor(-Number.MAX_VALUE, -Number.MAX_VALUE); 83 testFloor(-Number.MAX_VALUE, -Number.MAX_VALUE);
80 testFloor(Infinity, Infinity); 84 testFloor(Infinity, Infinity);
81 testFloor(-Infinity, -Infinity); 85 testFloor(-Infinity, -Infinity);
82 } 86 }
83 87
84 88
85 // Test in a loop to cover the custom IC and GC-related issues. 89 // Test in a loop to cover the custom IC and GC-related issues.
86 for (var i = 0; i < 10; i++) { 90 for (var i = 0; i < 10; i++) {
87 test(); 91 test();
88 new Array(i * 10000); 92 new Array(i * 10000);
89 } 93 }
OLDNEW
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/math-round.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698