mirror of
https://github.com/tc39/test262.git
synced 2025-05-07 16:30:52 +02:00
commit c56030aea7b3e43f46dbbc2b52859ca275cff226 Author: Rick Waldron <waldron.rick@gmail.com> Date: Thu Apr 30 15:17:44 2015 -0400 Fix nits commit 9b341022a9fd5a295ce85b630886dae10e10b653 Author: Rick Waldron <waldron.rick@gmail.com> Date: Tue Apr 28 13:52:04 2015 -0400 Wrap expected construct failure in assert.throws commit 9ef7e1c0499a99b15c64bb480dbfa41433cf9804 Author: Mike Pennisi <mike@mikepennisi.com> Date: Fri Apr 24 13:46:02 2015 -0400 Introduce addition tests for the Set constructor commit bd54cccf4a599c123fae5c97782f5562cd9da8a0 Author: Rick Waldron <waldron.rick@gmail.com> Date: Fri Apr 24 15:11:19 2015 -0400 23.2 Set Objects, additions commit 970e2ca95879161a8bb124ec712f7333fdea6798 Author: Rick Waldron <waldron.rick@gmail.com> Date: Tue Apr 21 12:44:41 2015 -0400 23.2 Set Objects
18 lines
584 B
JavaScript
18 lines
584 B
JavaScript
// Copyright (C) 2013 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
es6id: 19.4
|
|
description: >
|
|
Symbol as Set entry
|
|
features: [Set]
|
|
---*/
|
|
var set = new Set();
|
|
var sym = Symbol();
|
|
|
|
set.add(sym);
|
|
|
|
assert.sameValue(set.size, 1, "The value of `set.size` is `1`, after executing `set.add(sym)`");
|
|
assert.sameValue(set.has(sym), true, "`set.has(sym)` returns `true`");
|
|
assert.sameValue(set.delete(sym), true, "`set.delete(sym)` returns `true`");
|
|
assert.sameValue(set.size, 0, "The value of `set.size` is `0`");
|