summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/filter/15.4.4.20-1-2.js
blob: 67b1857304577f8b439db5537c55518d076cda37 (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.20-1-2
description: Array.prototype.filter applied to null throws a TypeError
includes: [runTestCase.js]
---*/

function testcase() {
        try {
            Array.prototype.filter.call(null);
            return false;
        } catch (ex) {
            return ex instanceof TypeError;
        }
    }
runTestCase(testcase);