3
Corresponds To: 15.7.4.2-2-n.js
4
ECMA Section: 15.7.4.2.2 Number.prototype.toString()
6
If the radix is the number 10 or not supplied, then this number value is
7
given as an argument to the ToString operator; the resulting string value
10
If the radix is supplied and is an integer from 2 to 36, but not 10, the
11
result is a string, the choice of which is implementation dependent.
13
The toString function is not generic; it generates a runtime error if its
14
this value is not a Number object. Therefore it cannot be transferred to
15
other kinds of objects for use as a method.
17
Author: christine@netscape.com
18
Date: 16 september 1997
20
var SECTION = "number-001";
21
var VERSION = "JS1_4";
22
var TITLE = "Exceptions for Number.toString()";
25
writeHeaderToLog( SECTION + " Number.prototype.toString()");
27
var testcases = new Array();
31
var result = "Failed";
32
var exception = "No exception thrown";
33
var expect = "Passed";
38
object.toString = Number.prototype.toString;
39
result = object.toString();
42
exception = e.toString();
45
testcases[tc++] = new TestCase(
47
"object = new Object(); object.toString = Number.prototype.toString; object.toString()" +
48
" (threw " + exception +")",