michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: /** michael@0: File Name: 15.8.2.16.js michael@0: ECMA Section: 15.8.2.16 sin( x ) michael@0: Description: return an approximation to the sine of the michael@0: argument. argument is expressed in radians michael@0: Author: christine@netscape.com michael@0: Date: 7 july 1997 michael@0: michael@0: */ michael@0: var SECTION = "15.8.2.16"; michael@0: var VERSION = "ECMA_1"; michael@0: startTest(); michael@0: var TITLE = "Math.sin(x)"; michael@0: michael@0: writeHeaderToLog( SECTION + " "+ TITLE); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin.length", michael@0: 1, michael@0: Math.sin.length ); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin()", michael@0: Number.NaN, michael@0: Math.sin() ); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(null)", michael@0: 0, michael@0: Math.sin(null) ); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(void 0)", michael@0: Number.NaN, michael@0: Math.sin(void 0) ); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(false)", michael@0: 0, michael@0: Math.sin(false) ); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin('2.356194490192')", michael@0: 0.7071067811865, michael@0: Math.sin('2.356194490192') ); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(NaN)", michael@0: Number.NaN, michael@0: Math.sin(Number.NaN) ); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(0)", michael@0: 0, michael@0: Math.sin(0) ); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(-0)", michael@0: -0, michael@0: Math.sin(-0)); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(Infinity)", michael@0: Number.NaN, michael@0: Math.sin(Number.POSITIVE_INFINITY)); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(-Infinity)", michael@0: Number.NaN, michael@0: Math.sin(Number.NEGATIVE_INFINITY)); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(0.7853981633974)", michael@0: 0.7071067811865, michael@0: Math.sin(0.7853981633974)); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(1.570796326795)", michael@0: 1, michael@0: Math.sin(1.570796326795)); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(2.356194490192)", michael@0: 0.7071067811865, michael@0: Math.sin(2.356194490192)); michael@0: michael@0: new TestCase( SECTION, michael@0: "Math.sin(3.14159265359)", michael@0: 0, michael@0: Math.sin(3.14159265359)); michael@0: michael@0: test();