summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js')
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js
index 2b77f84c0..3c6dce4a6 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-11.js
@@ -6,29 +6,21 @@ es5id: 15.4.4.21-4-11
description: >
Array.prototype.reduce - the exception is not thrown if exception
was thrown by step 3
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var obj = { 0: 11, 1: 12 };
Object.defineProperty(obj, "length", {
get: function () {
return {
toString: function () {
- throw new SyntaxError();
+ throw new Test262Error();
}
};
},
configurable: true
});
- try {
+assert.throws(Test262Error, function() {
Array.prototype.reduce.call(obj, undefined);
- return false;
- } catch (ex) {
- return !(ex instanceof TypeError);
- }
- }
-runTestCase(testcase);
+});