| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
gTestfile = '15.8.2.4.js'; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
var SECTION = "15.8.2.4"; |
| 25 |
var VERSION = "ECMA_1"; |
| 26 |
var TITLE = "Math.atan()"; |
| 27 |
var BUGNUMBER="77391"; |
| 28 |
|
| 29 |
startTest(); |
| 30 |
|
| 31 |
writeHeaderToLog( SECTION + " "+ TITLE); |
| 32 |
|
| 33 |
new TestCase( SECTION, |
| 34 |
"Math.atan.length", |
| 35 |
1, |
| 36 |
Math.atan.length ); |
| 37 |
|
| 38 |
new TestCase( SECTION, |
| 39 |
"Math.atan()", |
| 40 |
Number.NaN, |
| 41 |
Math.atan() ); |
| 42 |
|
| 43 |
new TestCase( SECTION, |
| 44 |
"Math.atan(void 0)", |
| 45 |
Number.NaN, |
| 46 |
Math.atan(void 0) ); |
| 47 |
|
| 48 |
new TestCase( SECTION, |
| 49 |
"Math.atan(null)", |
| 50 |
0, |
| 51 |
Math.atan(null) ); |
| 52 |
|
| 53 |
new TestCase( SECTION, |
| 54 |
"Math.atan(NaN)", |
| 55 |
Number.NaN, |
| 56 |
Math.atan(Number.NaN) ); |
| 57 |
|
| 58 |
new TestCase( SECTION, |
| 59 |
"Math.atan('a string')", |
| 60 |
Number.NaN, |
| 61 |
Math.atan("a string") ); |
| 62 |
|
| 63 |
new TestCase( SECTION, |
| 64 |
"Math.atan('0')", |
| 65 |
0, |
| 66 |
Math.atan('0') ); |
| 67 |
|
| 68 |
new TestCase( SECTION, |
| 69 |
"Math.atan('1')", |
| 70 |
Math.PI/4, |
| 71 |
Math.atan('1') ); |
| 72 |
|
| 73 |
new TestCase( SECTION, |
| 74 |
"Math.atan('-1')", |
| 75 |
-Math.PI/4, |
| 76 |
Math.atan('-1') ); |
| 77 |
|
| 78 |
new TestCase( SECTION, |
| 79 |
"Math.atan('Infinity)", |
| 80 |
Math.PI/2, |
| 81 |
Math.atan('Infinity') ); |
| 82 |
|
| 83 |
new TestCase( SECTION, |
| 84 |
"Math.atan('-Infinity)", |
| 85 |
-Math.PI/2, |
| 86 |
Math.atan('-Infinity') ); |
| 87 |
|
| 88 |
new TestCase( SECTION, |
| 89 |
"Math.atan(0)", |
| 90 |
0, |
| 91 |
Math.atan(0) ); |
| 92 |
|
| 93 |
new TestCase( SECTION, |
| 94 |
"Math.atan(-0)", |
| 95 |
-0, |
| 96 |
Math.atan(-0) ); |
| 97 |
|
| 98 |
new TestCase( SECTION, |
| 99 |
"Infinity/Math.atan(-0)", |
| 100 |
-Infinity, |
| 101 |
Infinity/Math.atan(-0) ); |
| 102 |
|
| 103 |
new TestCase( SECTION, |
| 104 |
"Math.atan(Infinity)", |
| 105 |
Math.PI/2, |
| 106 |
Math.atan(Number.POSITIVE_INFINITY) ); |
| 107 |
|
| 108 |
new TestCase( SECTION, |
| 109 |
"Math.atan(-Infinity)", |
| 110 |
-Math.PI/2, |
| 111 |
Math.atan(Number.NEGATIVE_INFINITY) ); |
| 112 |
|
| 113 |
new TestCase( SECTION, |
| 114 |
"Math.atan(1)", |
| 115 |
Math.PI/4, |
| 116 |
Math.atan(1) ); |
| 117 |
|
| 118 |
new TestCase( SECTION, |
| 119 |
"Math.atan(-1)", |
| 120 |
-Math.PI/4, |
| 121 |
Math.atan(-1) ); |
| 122 |
|
| 123 |
test(); |