2015-04-19 18:08:14 +00:00
|
|
|
Tests basic correctness of ES WeakSet object
|
|
|
|
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
|
|
|
|
|
|
PASS WeakSet instanceof WeakSet is false
|
|
|
|
PASS WeakSet.prototype instanceof WeakSet is false
|
|
|
|
PASS new WeakSet() instanceof WeakSet is true
|
2016-02-23 19:41:56 +00:00
|
|
|
PASS WeakSet() threw exception TypeError: calling WeakSet constructor without new is invalid.
|
2021-03-31 07:21:37 +00:00
|
|
|
PASS set.add(0) threw exception TypeError: Attempted to add a non-object value to a WeakSet.
|
|
|
|
PASS set.add(0.5) threw exception TypeError: Attempted to add a non-object value to a WeakSet.
|
|
|
|
PASS set.add('foo') threw exception TypeError: Attempted to add a non-object value to a WeakSet.
|
|
|
|
PASS set.add(true) threw exception TypeError: Attempted to add a non-object value to a WeakSet.
|
|
|
|
PASS set.add(false) threw exception TypeError: Attempted to add a non-object value to a WeakSet.
|
|
|
|
PASS set.add(null) threw exception TypeError: Attempted to add a non-object value to a WeakSet.
|
|
|
|
PASS set.add(undefined) threw exception TypeError: Attempted to add a non-object value to a WeakSet.
|
|
|
|
PASS set.add(Symbol.iterator) threw exception TypeError: Attempted to add a non-object value to a WeakSet.
|
2015-04-19 18:08:14 +00:00
|
|
|
PASS set.has(0) is false
|
|
|
|
PASS set.has(0.5) is false
|
|
|
|
PASS set.has('foo') is false
|
|
|
|
PASS set.has(true) is false
|
|
|
|
PASS set.has(false) is false
|
|
|
|
PASS set.has(null) is false
|
|
|
|
PASS set.has(undefined) is false
|
|
|
|
PASS set.has(Symbol.iterator) is false
|
|
|
|
PASS set.delete(0) is false
|
|
|
|
PASS set.delete(0.5) is false
|
|
|
|
PASS set.delete('foo') is false
|
|
|
|
PASS set.delete(true) is false
|
|
|
|
PASS set.delete(false) is false
|
|
|
|
PASS set.delete(null) is false
|
|
|
|
PASS set.delete(undefined) is false
|
|
|
|
PASS set.delete(Symbol.iterator) is false
|
|
|
|
PASS set.add(new String('foo')) is set
|
|
|
|
PASS set.add(new String('foo')) is set
|
|
|
|
PASS set.has(new String('foo')) is false
|
|
|
|
PASS set.add(object) is set
|
|
|
|
PASS set.has(object) is true
|
|
|
|
PASS set.delete(new String('foo')) is false
|
|
|
|
PASS set.delete(object) is true
|
|
|
|
PASS set.has(object) is false
|
|
|
|
PASS set.delete(object) is false
|
|
|
|
PASS successfullyParsed is true
|
|
|
|
|
|
|
|
TEST COMPLETE
|
|
|
|
|