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

Side by Side Diff: test/mjsunit/number-literal.js

Issue 459463002: ES6: Duplicate properties are no longer an error (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test for number literals that was previously part of duplicate property test Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/strict-mode.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 function test(message, a, b, skipStrictMode) {
6 assertSame(eval(a), eval(b), message);
7 if (!skipStrictMode) {
8 (function() {
9 'use strict';
10 assertSame(eval(a), eval(b), message);
11 })();
12 }
13 }
14
15 test('hex-int', '0x20', '32');
16 test('oct-int', '040', '32', true); // Octals disallowed in strict mode.
17 test('dec-int', '32.00', '32');
18 test('dec-underflow-int', '32.00000000000000000000000000000000000000001', '32');
19 test('exp-int', '3.2e1', '32');
20 test('exp-int', '3200e-2', '32');
21 test('overflow-inf', '1e2000', 'Infinity');
22 test('overflow-inf-exact', '1.797693134862315808e+308', 'Infinity');
23 test('non-overflow-inf-exact', '1.797693134862315807e+308',
24 '1.7976931348623157e+308');
25 test('underflow-0', '1e-2000', '0');
26 test('underflow-0-exact', '2.4703282292062E-324', '0');
27 test('non-underflow-0-exact', '2.4703282292063E-324', '5e-324');
28 test('precission-loss-high', '9007199254740992', '9007199254740993');
29 test('precission-loss-low', '1.9999999999999998', '1.9999999999999997');
30 test('non-canonical-literal-int', '1.0', '1');
31 test('non-canonical-literal-frac', '1.50', '1.5');
32 test('rounding-down', '1.12512512512512452', '1.1251251251251244');
33 test('rounding-up', '1.12512512512512453', '1.1251251251251246');
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/strict-mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698