blob: d4de3619f1defa15add13befe7f37d9dc3ed7264 [file] [log] [blame]
This test checks the behavior of Number.prototype.toLocaleString as described in the ECMAScript Internationalization API Specification (ECMA-402 2.0).
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Number.prototype.toLocaleString.length is 0
PASS Object.getOwnPropertyDescriptor(Number.prototype, 'toLocaleString').enumerable is false
PASS Object.getOwnPropertyDescriptor(Number.prototype, 'toLocaleString').configurable is true
PASS Object.getOwnPropertyDescriptor(Number.prototype, 'toLocaleString').writable is true
PASS Number.prototype.toLocaleString.call(0) did not throw exception.
PASS Number.prototype.toLocaleString.call(NaN) did not throw exception.
PASS Number.prototype.toLocaleString.call(Infinity) did not throw exception.
PASS Number.prototype.toLocaleString.call(new Number) did not throw exception.
PASS Number.prototype.toLocaleString.call() threw exception TypeError: Number.prototype.toLocaleString called on incompatible undefined.
PASS Number.prototype.toLocaleString.call(undefined) threw exception TypeError: Number.prototype.toLocaleString called on incompatible undefined.
PASS Number.prototype.toLocaleString.call(null) threw exception TypeError: Number.prototype.toLocaleString called on incompatible object.
PASS Number.prototype.toLocaleString.call('1') threw exception TypeError: Number.prototype.toLocaleString called on incompatible string.
PASS Number.prototype.toLocaleString.call([]) threw exception TypeError: Number.prototype.toLocaleString called on incompatible object.
PASS Number.prototype.toLocaleString.call(Symbol()) threw exception TypeError: Number.prototype.toLocaleString called on incompatible symbol.
PASS (0).toLocaleString() is "0"
PASS new Number(1).toLocaleString() is "1"
PASS successfullyParsed is true
TEST COMPLETE