js/src/tests/ecma_5/extensions/Number-toSource.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:8e6898856987
1 /*
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
4 */
5
6 assertEq(raisesException(TypeError)('Number.prototype.toSource.call("")'), true);
7 assertEq(raisesException(TypeError)('Number.prototype.toSource.call(true)'), true);
8 assertEq(raisesException(TypeError)('Number.prototype.toSource.call({})'), true);
9 assertEq(raisesException(TypeError)('Number.prototype.toSource.call(null)'), true);
10 assertEq(raisesException(TypeError)('Number.prototype.toSource.call([])'), true);
11 assertEq(raisesException(TypeError)('Number.prototype.toSource.call(undefined)'), true);
12 assertEq(raisesException(TypeError)('Number.prototype.toSource.call(new Boolean(true))'), true);
13
14 assertEq(completesNormally('Number.prototype.toSource.call(42)'), true);
15 assertEq(completesNormally('Number.prototype.toSource.call(new Number(42))'), true);
16
17 reportCompare(true, true);

mercurial