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

Side by Side Diff: test/mjsunit/es6/set-minus-zero.js

Issue 947443005: Fix issue with -0 in Maps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove extra file Created 5 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/es6/map-minus-zero.js ('k') | no next file » | 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 2015 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 'use strict';
6
7 var set = new Set();
8
9 var objectKey = {};
10 var stringKey = 'keykeykey';
11 var numberKey = 42.24;
12 var booleanKey = true;
13 var undefinedKey = undefined;
14 var nullKey = null;
15 var nanKey = NaN;
16 var zeroKey = 0;
17 var minusZeroKey = -0;
18
19 assertEquals(set.size, 0);
20
21 set.add(objectKey);
22 set.add(stringKey);
23 set.add(numberKey);
24 set.add(booleanKey);
25 set.add(undefinedKey);
26 set.add(nullKey);
27 set.add(nanKey);
28 set.add(zeroKey);
29
30 assertEquals(8, set.size);
31
32 assertTrue(set.has(objectKey));
33 assertTrue(set.has(stringKey));
34 assertTrue(set.has(numberKey));
35 assertTrue(set.has(booleanKey));
36 assertTrue(set.has(undefinedKey));
37 assertTrue(set.has(nullKey));
38 assertTrue(set.has(nanKey));
39 assertTrue(set.has(zeroKey));
40
41 assertFalse(set.has({}));
42 assertTrue(set.has('keykeykey'));
43 assertTrue(set.has(42.24));
44 assertTrue(set.has(true));
45 assertTrue(set.has(undefined));
46 assertTrue(set.has(null));
47 assertTrue(set.has(NaN));
48 assertTrue(set.has(0));
49 assertTrue(set.has(-0));
50 assertTrue(set.has(1 / Infinity));
51 assertTrue(set.has(-1 / Infinity));
OLDNEW
« no previous file with comments | « test/mjsunit/es6/map-minus-zero.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698