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