blob: 0614e574cbe66f66e8c8413463612cc68c34cf84 (
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.toSource.call(42)'), true);
assertEq(raisesException(TypeError)('String.prototype.toSource.call(true)'), true);
assertEq(raisesException(TypeError)('String.prototype.toSource.call({})'), true);
assertEq(raisesException(TypeError)('String.prototype.toSource.call(null)'), true);
assertEq(raisesException(TypeError)('String.prototype.toSource.call([])'), true);
assertEq(raisesException(TypeError)('String.prototype.toSource.call(undefined)'), true);
assertEq(completesNormally('String.prototype.toSource.call("")'), true);
reportCompare(true, true);
|