aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.11.4.4.json
blob: ce1628cfc81e09e227cff9892f8bb05e8b5ea64b (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
37
38
39
40
41
42
43
44
{
 "testCollection": {
  "name": "15.11.4.4",
  "numTests": 6,
  "tests": [
   {
    "id": "15.11.4.4-10-1",
    "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-10-1.js",
    "description": "Error.prototype.toString return the result of concatenating 'name', ':', a single space character, and 'msg' when 'name' and 'msg' are non-empty string",
    "test": "assertTrue((function testcase() {\n        var errObj = new Error(\"ErrorMessage\");\n        errObj.name = \"ErrorName\";\n        return errObj.toString() === \"ErrorName: ErrorMessage\";\n    }).call(this));\n"
   },
   {
    "id": "15.11.4.4-6-1",
    "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-1.js",
    "description": "Error.prototype.toString - 'Error' is returned when 'name' is absent and empty string is returned when 'msg' is undefined",
    "test": "assertTrue((function testcase() {\n        var errObj = new Error();\n        return errObj.toString() === \"Error\";\n    }).call(this));\n"
   },
   {
    "id": "15.11.4.4-6-2",
    "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-2.js",
    "description": "Error.prototype.toString - 'Error' is returned when 'name' is absent and value of 'msg' is returned when 'msg' is non-empty string",
    "test": "assertTrue((function testcase() {\n        var errObj = new Error(\"ErrorMessage\");\n        return errObj.toString() === \"Error: ErrorMessage\";\n    }).call(this));\n"
   },
   {
    "id": "15.11.4.4-8-1",
    "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-1.js",
    "description": "Error.prototype.toString return the value of 'msg' when 'name' is empty string and 'msg' isn't undefined",
    "test": "assertTrue((function testcase() {\n        var errObj = new Error(\"ErrorMessage\");\n        errObj.name = \"\";\n        return errObj.toString() === \"ErrorMessage\";\n    }).call(this));\n"
   },
   {
    "id": "15.11.4.4-8-2",
    "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-2.js",
    "description": "Error.prototype.toString return empty string when 'name' is empty string and 'msg' is undefined",
    "test": "assertTrue((function testcase() {\n        var errObj = new Error();\n        errObj.name = \"\";\n        return errObj.toString() === \"\";\n    }).call(this));\n"
   },
   {
    "id": "15.11.4.4-9-1",
    "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-9-1.js",
    "description": "Error.prototype.toString return 'name' when 'name' is non-empty string and 'msg' is empty string",
    "test": "assertTrue((function testcase() {\n        var errObj = new Error();\n        errObj.name = \"ErrorName\";\n        return errObj.toString() === \"ErrorName\";\n    }).call(this));\n"
   }
  ]
 }
}