Debian Codegraph @

js/src/tests/non262/Math/15.8.2.16.js

raw
1 /* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
7 /**
8 File Name: 15.8.2.16.js
9 ECMA Section: 15.8.2.16 sin( x )
10 Description: return an approximation to the sine of the
11 argument. argument is expressed in radians
12 Author: [email protected]
13 Date: 7 july 1997
14
15 */
16 var SECTION = "15.8.2.16";
17 var TITLE = "Math.sin(x)";
18
19 writeHeaderToLog( SECTION + " "+ TITLE);
20
21 new TestCase(
22 "Math.sin.length",
23 1,
24 Math.sin.length );
25
26 new TestCase(
27 "Math.sin()",
28 Number.NaN,
29 Math.sin() );
30
31 new TestCase(
32 "Math.sin(null)",
33 0,
34 Math.sin(null) );
35
36 new TestCase(
37 "Math.sin(void 0)",
38 Number.NaN,
39 Math.sin(void 0) );
40
41 new TestCase(
42 "Math.sin(false)",
43 0,
44 Math.sin(false) );
45
46 new TestCase(
47 "Math.sin('2.356194490192')",
48 0.7071067811865,
49 Math.sin('2.356194490192') );
50
51 new TestCase(
52 "Math.sin(NaN)",
53 Number.NaN,
54 Math.sin(Number.NaN) );
55
56 new TestCase(
57 "Math.sin(0)",
58 0,
59 Math.sin(0) );
60
61 new TestCase(
62 "Math.sin(-0)",
63 -0,
64 Math.sin(-0));
65
66 new TestCase(
67 "Math.sin(Infinity)",
68 Number.NaN,
69 Math.sin(Number.POSITIVE_INFINITY));
70
71 new TestCase(
72 "Math.sin(-Infinity)",
73 Number.NaN,
74 Math.sin(Number.NEGATIVE_INFINITY));
75
76 new TestCase(
77 "Math.sin(0.7853981633974)",
78 0.7071067811865,
79 Math.sin(0.7853981633974));
80
81 new TestCase(
82 "Math.sin(1.570796326795)",
83 1,
84 Math.sin(1.570796326795));
85
86 new TestCase(
87 "Math.sin(2.356194490192)",
88 0.7071067811865,
89 Math.sin(2.356194490192));
90
91 new TestCase(
92 "Math.sin(3.14159265359)",
93 0,
94 Math.sin(3.14159265359));
95
96 test();