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

Side by Side Diff: test/mjsunit/math-round.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 | « test/mjsunit/math-floor-part1.js ('k') | test/mjsunit/number-is.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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 testRound(-1, -1.1); 73 testRound(-1, -1.1);
74 testRound(-1, -1.49999); 74 testRound(-1, -1.49999);
75 testRound(-1, -1.5); 75 testRound(-1, -1.5);
76 76
77 testRound(9007199254740990, 9007199254740990); 77 testRound(9007199254740990, 9007199254740990);
78 testRound(9007199254740991, 9007199254740991); 78 testRound(9007199254740991, 9007199254740991);
79 testRound(-9007199254740990, -9007199254740990); 79 testRound(-9007199254740990, -9007199254740990);
80 testRound(-9007199254740991, -9007199254740991); 80 testRound(-9007199254740991, -9007199254740991);
81 testRound(Number.MAX_VALUE, Number.MAX_VALUE); 81 testRound(Number.MAX_VALUE, Number.MAX_VALUE);
82 testRound(-Number.MAX_VALUE, -Number.MAX_VALUE); 82 testRound(-Number.MAX_VALUE, -Number.MAX_VALUE);
83 testRound(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
84 testRound(Number.MAX_SAFE_INTEGER + 1, Number.MAX_SAFE_INTEGER + 1);
85 testRound(Number.MAX_SAFE_INTEGER + 2, Number.MAX_SAFE_INTEGER + 2);
86 testRound(Number.MAX_SAFE_INTEGER + 3, Number.MAX_SAFE_INTEGER + 3);
87 testRound(Number.MAX_SAFE_INTEGER + 4, Number.MAX_SAFE_INTEGER + 4);
88 testRound(Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER);
89 testRound(Number.MIN_SAFE_INTEGER - 1, Number.MIN_SAFE_INTEGER - 1);
90 testRound(Number.MIN_SAFE_INTEGER - 2, Number.MIN_SAFE_INTEGER - 2);
91 testRound(Number.MIN_SAFE_INTEGER - 3, Number.MIN_SAFE_INTEGER - 3);
83 92
84 testRound(536870911, 536870910.5); 93 testRound(536870911, 536870910.5);
85 testRound(536870911, 536870911); 94 testRound(536870911, 536870911);
86 testRound(536870911, 536870911.4); 95 testRound(536870911, 536870911.4);
87 testRound(536870912, 536870911.5); 96 testRound(536870912, 536870911.5);
88 testRound(536870912, 536870912); 97 testRound(536870912, 536870912);
89 testRound(536870912, 536870912.4); 98 testRound(536870912, 536870912.4);
90 testRound(536870913, 536870912.5); 99 testRound(536870913, 536870912.5);
91 testRound(536870913, 536870913); 100 testRound(536870913, 536870913);
92 testRound(536870913, 536870913.4); 101 testRound(536870913, 536870913.4);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 testRound(-0, -0.49999999999999994); 172 testRound(-0, -0.49999999999999994);
164 testRound(-0, -0.5); 173 testRound(-0, -0.5);
165 testRound(-Math.pow(2,52)+1, -max_fraction); 174 testRound(-Math.pow(2,52)+1, -max_fraction);
166 testRound(-min_nonfraction, -min_nonfraction); 175 testRound(-min_nonfraction, -min_nonfraction);
167 testRound(-max_non_infinite, -max_non_infinite); 176 testRound(-max_non_infinite, -max_non_infinite);
168 177
169 testRound(min_smi31, min_smi31 - 0.5); 178 testRound(min_smi31, min_smi31 - 0.5);
170 testRound(min_smi31 + 1, min_smi31 + 0.5); 179 testRound(min_smi31 + 1, min_smi31 + 0.5);
171 testRound(min_smi32, min_smi32 - 0.5); 180 testRound(min_smi32, min_smi32 - 0.5);
172 testRound(min_smi32 + 1, min_smi32 + 0.5); 181 testRound(min_smi32 + 1, min_smi32 + 0.5);
OLDNEW
« no previous file with comments | « test/mjsunit/math-floor-part1.js ('k') | test/mjsunit/number-is.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698