| Tests basic correctness of ES WeakMap object |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS WeakMap instanceof WeakMap is false |
| PASS WeakMap.prototype instanceof WeakMap is false |
| PASS new WeakMap() instanceof WeakMap is true |
| PASS WeakMap() threw exception TypeError: calling WeakMap constructor without new is invalid. |
| PASS map.set(0, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. |
| PASS map.set(0.5, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. |
| PASS map.set('foo', 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. |
| PASS map.set(true, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. |
| PASS map.set(false, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. |
| PASS map.set(null, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. |
| PASS map.set(undefined, 1) threw exception TypeError: Attempted to set a non-object key in a WeakMap. |
| PASS map.get(0) is undefined. |
| PASS map.get(0.5) is undefined. |
| PASS map.get('foo') is undefined. |
| PASS map.get(true) is undefined. |
| PASS map.get(false) is undefined. |
| PASS map.get(null) is undefined. |
| PASS map.get(undefined) is undefined. |
| PASS map.has(0) is false |
| PASS map.has(0.5) is false |
| PASS map.has('foo') is false |
| PASS map.has(true) is false |
| PASS map.has(false) is false |
| PASS map.has(null) is false |
| PASS map.has(undefined) is false |
| PASS map.delete(0) is false |
| PASS map.delete(0.5) is false |
| PASS map.delete('foo') is false |
| PASS map.delete(true) is false |
| PASS map.delete(false) is false |
| PASS map.delete(null) is false |
| PASS map.delete(undefined) is false |
| PASS map.set(new String('foo'), 'foo') is map |
| PASS map.get(new String('foo')) is undefined. |
| PASS map.has(new String('foo')) is false |
| PASS map.set(object, 'foo') is map |
| PASS map.has(object) is true |
| PASS map.get(object) is 'foo' |
| PASS map.delete(object) is true |
| PASS map.has(object) is false |
| PASS map.delete(object) is false |
| PASS map.get(object) is undefined. |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |