diff options
Diffstat (limited to 'third_party/webkit/PerformanceTests/six-speed/tests/map-set-object.es6')
-rw-r--r-- | third_party/webkit/PerformanceTests/six-speed/tests/map-set-object.es6 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/third_party/webkit/PerformanceTests/six-speed/tests/map-set-object.es6 b/third_party/webkit/PerformanceTests/six-speed/tests/map-set-object.es6 new file mode 100644 index 0000000000..8624a0bb27 --- /dev/null +++ b/third_party/webkit/PerformanceTests/six-speed/tests/map-set-object.es6 @@ -0,0 +1,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); |