var SECTION = "15.6.4.2-2";
var VERSION = "ECMA_1";
startTest();
var TITLE = "Boolean.prototype.toString()"
writeHeaderToLog( SECTION + TITLE );
var testcases = getTestCases();
test();
function getTestCases() {
var array = new Array();
var item = 0;
array[item++] = new TestCase( SECTION,
"tostr=Boolean.prototype.toString; x=new Boolean(); x.toString=tostr;x.toString()",
"false",
"tostr=Boolean.prototype.toString; x=new Boolean(); x.toString=tostr;x.toString()" );
array[item++] = new TestCase( SECTION,
"tostr=Boolean.prototype.toString; x=new Boolean(true); x.toString=tostr; x.toString()",
"true",
"tostr=Boolean.prototype.toString; x=new Boolean(true); x.toString=tostr; x.toString()" );
array[item++] = new TestCase( SECTION,
"tostr=Boolean.prototype.toString; x=new Boolean(false); x.toString=tostr;x.toString()",
"false",
"tostr=Boolean.prototype.toString; x=new Boolean(); x.toString=tostr;x.toString()" );
return ( array );
}
function test() {
for ( tc=0; tc < testcases.length; tc++ ) {
testcases[tc].actual = eval( testcases[tc].actual );
testcases[tc].passed = writeTestCaseResult(
testcases[tc].expect,
testcases[tc].actual,
testcases[tc].description +" = "+
testcases[tc].actual );
testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
}
stopTest();
return ( testcases );
}