var SECTION = "15.8.2.18";
var VERSION = "ECMA_1";
startTest();
var TITLE = "Math.tan(x)";
var EXCLUDE = "true";
writeHeaderToLog( SECTION + " "+ TITLE);
var testcases = getTestCases();
test();
function getTestCases() {
var array = new Array();
var item = 0;
array[item++] = new TestCase( SECTION, "Math.tan.length", 1, Math.tan.length );
array[item++] = new TestCase( SECTION, "Math.tan()", Number.NaN, Math.tan() );
array[item++] = new TestCase( SECTION, "Math.tan(void 0)", Number.NaN, Math.tan(void 0));
array[item++] = new TestCase( SECTION, "Math.tan(null)", 0, Math.tan(null) );
array[item++] = new TestCase( SECTION, "Math.tan(false)", 0, Math.tan(false) );
array[item++] = new TestCase( SECTION, "Math.tan(NaN)", Number.NaN, Math.tan(Number.NaN) );
array[item++] = new TestCase( SECTION, "Math.tan(0)", 0, Math.tan(0));
array[item++] = new TestCase( SECTION, "Math.tan(-0)", -0, Math.tan(-0));
array[item++] = new TestCase( SECTION, "Math.tan(Infinity)", Number.NaN, Math.tan(Number.POSITIVE_INFINITY));
array[item++] = new TestCase( SECTION, "Math.tan(-Infinity)", Number.NaN, Math.tan(Number.NEGATIVE_INFINITY));
array[item++] = new TestCase( SECTION, "Math.tan(Math.PI/4)", 1, Math.tan(Math.PI/4));
array[item++] = new TestCase( SECTION, "Math.tan(3*Math.PI/4)", -1, Math.tan(3*Math.PI/4));
array[item++] = new TestCase( SECTION, "Math.tan(Math.PI)", -0, Math.tan(Math.PI));
array[item++] = new TestCase( SECTION, "Math.tan(5*Math.PI/4)", 1, Math.tan(5*Math.PI/4));
array[item++] = new TestCase( SECTION, "Math.tan(7*Math.PI/4)", -1, Math.tan(7*Math.PI/4));
array[item++] = new TestCase( SECTION, "Infinity/Math.tan(-0)", -Infinity, Infinity/Math.tan(-0) );
array[item++] = new TestCase( SECTION, "Math.tan(3*Math.PI/2) >= 5443000000000000", true, Math.tan(3*Math.PI/2) >= 5443000000000000 );
array[item++] = new TestCase( SECTION, "Math.tan(Math.PI/2) >= 5443000000000000", true, Math.tan(Math.PI/2) >= 5443000000000000 );
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 );
}