mirror of
https://github.com/tc39/test262.git
synced 2025-05-03 06:20:37 +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
31 lines
731 B
JavaScript
31 lines
731 B
JavaScript
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
es6id: 23.2.1.1
|
|
description: >
|
|
Set ( [ iterable ] )
|
|
|
|
When the Set function is called with optional argument iterable the following steps are taken:
|
|
|
|
...
|
|
2. Let set be OrdinaryCreateFromConstructor(NewTarget, "%SetPrototype%", «[[SetData]]» ).
|
|
...
|
|
|
|
---*/
|
|
|
|
var s1 = new Set();
|
|
|
|
assert.sameValue(
|
|
Object.getPrototypeOf(s1),
|
|
Set.prototype,
|
|
"`Object.getPrototypeOf(s1)` returns `Set.prototype`"
|
|
);
|
|
|
|
var s2 = new Set([1, 2]);
|
|
|
|
assert.sameValue(
|
|
Object.getPrototypeOf(s2),
|
|
Set.prototype,
|
|
"`Object.getPrototypeOf(s2)` returns `Set.prototype`"
|
|
);
|