mirror of https://github.com/tc39/test262.git
45 lines
2.7 KiB
JSON
45 lines
2.7 KiB
JSON
{
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|