summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_5/String/15.5.4.2.js
blob: 46c7ccb69c3774f112e3850261cd78ecfbc74af1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

assertEq(raisesException(TypeError)('String.prototype.toString.call(42)'), true);
assertEq(raisesException(TypeError)('String.prototype.toString.call(true)'), true);
assertEq(raisesException(TypeError)('String.prototype.toString.call({})'), true);
assertEq(raisesException(TypeError)('String.prototype.toString.call(null)'), true);
assertEq(raisesException(TypeError)('String.prototype.toString.call([])'), true);
assertEq(raisesException(TypeError)('String.prototype.toString.call(undefined)'), true);
assertEq(completesNormally('String.prototype.toString.call("")'), true);

reportCompare(true, true);