var SECTION = "15.5.4.3-1";
var VERSION = "ECMA_1";
startTest();
var TITLE = "String.prototype.valueOf";
writeHeaderToLog( SECTION + " "+ TITLE);
var testcases = getTestCases();
test();
function getTestCases() {
var array = new Array();
var item = 0;
array[item++] = new TestCase( SECTION, "String.prototype.valueOf.length", 0, String.prototype.valueOf.length );
array[item++] = new TestCase( SECTION, "String.prototype.valueOf()", "", String.prototype.valueOf() );
array[item++] = new TestCase( SECTION, "(new String()).valueOf()", "", (new String()).valueOf() );
array[item++] = new TestCase( SECTION, "(new String(\"\")).valueOf()", "", (new String("")).valueOf() );
array[item++] = new TestCase( SECTION, "(new String( String() )).valueOf()","", (new String(String())).valueOf() );
array[item++] = new TestCase( SECTION, "(new String( \"h e l l o\" )).valueOf()", "h e l l o", (new String("h e l l o")).valueOf() );
array[item++] = new TestCase( SECTION, "(new String( 0 )).valueOf()", "0", (new String(0)).valueOf() );
return ( array );
}
function test( array ) {
for ( tc=0; tc < testcases.length; tc++ ) {
testcases[tc].passed = writeTestCaseResult(
testcases[tc].expect,
testcases[tc].actual,
testcases[tc].description +" = "+ testcases[tc].actual );
}
stopTest();
return ( testcases );
}