summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/six-speed/tests/map-set-object.es6
blob: 8624a0bb27a3df56d9108664a1bbfe4029548175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function fn() {
  var map = new Map(),
      set = new Set(),
      key = {};

  for (var i = 0; i < 500; i++) {
    map.set(i, i);
    set.add(i);
  }

  map.set(key, 'bar');
  set.add(key);

  return map.has(key) && set.has(key);
}

assertEqual(fn(), true);
test(fn);