blob: 3e10afa3880738b95cf7bb1e624d72199aa311d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/*
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/licenses/publicdomain/
*/
assertEq(raisesException(TypeError)('Boolean.prototype.toString.call(42)'), true);
assertEq(raisesException(TypeError)('Boolean.prototype.toString.call("")'), true);
assertEq(raisesException(TypeError)('Boolean.prototype.toString.call({})'), true);
assertEq(raisesException(TypeError)('Boolean.prototype.toString.call(null)'), true);
assertEq(raisesException(TypeError)('Boolean.prototype.toString.call([])'), true);
assertEq(raisesException(TypeError)('Boolean.prototype.toString.call(undefined)'), true);
assertEq(raisesException(TypeError)('Boolean.prototype.toString.call(new String())'), true);
assertEq(completesNormally('Boolean.prototype.toString.call(true)'), true);
assertEq(completesNormally('Boolean.prototype.toString.call(new Boolean(true))'), true);
reportCompare(true, true);
|