diff options
Diffstat (limited to 'third_party/webkit/PerformanceTests/six-speed/tests/map-set.es6')
-rw-r--r-- | third_party/webkit/PerformanceTests/six-speed/tests/map-set.es6 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/third_party/webkit/PerformanceTests/six-speed/tests/map-set.es6 b/third_party/webkit/PerformanceTests/six-speed/tests/map-set.es6 new file mode 100644 index 0000000000..583450d1db --- /dev/null +++ b/third_party/webkit/PerformanceTests/six-speed/tests/map-set.es6 @@ -0,0 +1,17 @@ +function fn() { + var map = new Map(), + set = new Set(); + + for (var i = 0; i < 250; i++) { + map.set(i, i); + set.add(i); + } + + map.set('foo', 'bar'); + set.add('bar'); + + return map.has('foo') && set.has('bar'); +} + +assertEqual(fn(), true); +test(fn); |