// Copyright 2017 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.constkey1={};constkey2={};constset=newSet([,1]);assertEquals(set.has(undefined),true);assertEquals(set.has(1),true);constdoubleSet=newSet([,1.234]);assertEquals(doubleSet.has(undefined),true);assertEquals(doubleSet.has(1.234),true);constmap=newMap([[,key1],[key2,]]);assertEquals(map.get(undefined),key1);assertEquals(map.get(key2),undefined);constdoublesMap=newMap([[,1.234]]);assertEquals(doublesMap.get(undefined),1.234);constweakmap=newWeakMap([[key1,]]);assertEquals(weakmap.get(key1),undefined);assertThrows(()=>newWeakSet([,{}]));assertThrows(()=>newWeakSet([,1.234]));assertThrows(()=>newMap([,[,key1]]));assertThrows(()=>newWeakMap([[,key1]]));assertThrows(()=>newWeakMap([,[,key1]]));