summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-1.js
blob: da9fe53abf932cb842cf47e31fd4b09d9abe9242 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.4.4.22-1-1
description: Array.prototype.reduceRight applied to undefined throws a TypeError
includes: [runTestCase.js]
---*/

function testcase() {
        try {
            Array.prototype.reduceRight.call(undefined); 
            return false;
        } catch (e) {
            return (e instanceof TypeError);
        }
    }
runTestCase(testcase);