var SECTION = "15.8.2.2";
var VERSION = "ECMA_1";
startTest();
var TITLE = "Math.acos()";
writeHeaderToLog( SECTION + " "+ TITLE);
var testcases = getTestCases();
test();
function getTestCases() {
var array = new Array();
var item = 0;
array[item++] = new TestCase( SECTION, "Math.acos.length", 1, Math.acos.length );
array[item++] = new TestCase( SECTION, "Math.acos(void 0)", Number.NaN, Math.acos(void 0) );
array[item++] = new TestCase( SECTION, "Math.acos()", Number.NaN, Math.acos() );
array[item++] = new TestCase( SECTION, "Math.acos(null)", Math.PI/2, Math.acos(null) );
array[item++] = new TestCase( SECTION, "Math.acos(NaN)", Number.NaN, Math.acos(Number.NaN) );
array[item++] = new TestCase( SECTION, "Math.acos(a string)", Number.NaN, Math.acos("a string") );
array[item++] = new TestCase( SECTION, "Math.acos('0')", Math.PI/2, Math.acos('0') );
array[item++] = new TestCase( SECTION, "Math.acos('1')", 0, Math.acos('1') );
array[item++] = new TestCase( SECTION, "Math.acos('-1')", Math.PI, Math.acos('-1') );
array[item++] = new TestCase( SECTION, "Math.acos(1.00000001)", Number.NaN, Math.acos(1.00000001) );
array[item++] = new TestCase( SECTION, "Math.acos(11.00000001)", Number.NaN, Math.acos(-1.00000001) );
array[item++] = new TestCase( SECTION, "Math.acos(1)", 0, Math.acos(1) );
array[item++] = new TestCase( SECTION, "Math.acos(-1)", Math.PI, Math.acos(-1) );
array[item++] = new TestCase( SECTION, "Math.acos(0)", Math.PI/2, Math.acos(0) );
array[item++] = new TestCase( SECTION, "Math.acos(-0)", Math.PI/2, Math.acos(-0) );
array[item++] = new TestCase( SECTION, "Math.acos(Math.SQRT1_2)", Math.PI/4, Math.acos(Math.SQRT1_2));
array[item++] = new TestCase( SECTION, "Math.acos(-Math.SQRT1_2)", Math.PI/4*3, Math.acos(-Math.SQRT1_2));
array[item++] = new TestCase( SECTION, "Math.acos(0.9999619230642)", Math.PI/360, Math.acos(0.9999619230642));
return ( array );
}
function test() {
for ( tc=0; tc < testcases.length; tc++ ) {
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 );
}