summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Function/prototype/toString/S15.3.4.2_A13.js
blob: 59400e6d15a8354b43a2af4262d5547cb5b2a27b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2011 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.3.4.2_A13
description: >
    The toString function is not generic; it throws a TypeError
    exception if its this value is not a callable object.
---*/

assert.throws(TypeError, function() {
  Function.prototype.toString.call(null);
}, 'Function.prototype.toString.call(null) throws a TypeError exception');

reportCompare(0, 0);