aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.8.1.3_LN2.json
blob: 6d0c28556c722dd45b84a219dda082495716ab76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
 "testCollection": {
  "name": "15.8.1.3_LN2",
  "numTests": 4,
  "tests": [
   {
    "section": "15.8.1.3",
    "description": "Comparing Math.LN2 with 0.6931471805599453",
    "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.LN2, 0.6931471805599453)) {\n  $ERROR('#1: \\'Math.LN2 is not approximately equal to 0.6931471805599453\\'');\n}\n",
    "id": "S15.8.1.3_A1"
   },
   {
    "section": "15.8.1.3",
    "description": "Checking if Math.LN2 property has the attribute DontEnum",
    "test": "// CHECK#1\nfor(x in Math) {\n  if(x === \"LN2\") {\n    $ERROR('#1: Value Property LN2 of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"LN2\"}\\'');\n  }\n}\n\n",
    "id": "S15.8.1.3_A2"
   },
   {
    "section": "15.8.1.3",
    "description": "Checking if Math.LN2 property has the attribute DontDelete",
    "strict_mode_negative": "",
    "test": "// CHECK#1\nif (delete Math.LN2 === true) {\n    $ERROR('#1: Value Property LN2 of the Math Object hasn\\'t attribute DontDelete: \\'Math.LN2 === true\\'');\n}\n\n",
    "id": "S15.8.1.3_A3",
    "strict_only": ""
   },
   {
    "section": "15.8.1.3",
    "description": "Checking if Math.LN2 property has the attribute DontDelete",
    "strict_mode_negative": "",
    "test": "// CHECK#1\nvar x = Math.LN2;\nMath.LN2 = 1;\nif (Math.LN2 !== x) {\n  $ERROR('#1: Math.LN2 hasn\\'t ReadOnly: \\'x = Math.LN2;Math.LN2 = 1;Math.LN2 === x\\'');\n}\n",
    "id": "S15.8.1.3_A4",
    "strict_only": ""
   }
  ]
 }
}