diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype/toString/S15.3.4.2_A13.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Function/prototype/toString/S15.3.4.2_A13.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/S15.3.4.2_A13.js b/js/src/tests/test262/built-ins/Function/prototype/toString/S15.3.4.2_A13.js new file mode 100644 index 0000000000..59400e6d15 --- /dev/null +++ b/js/src/tests/test262/built-ins/Function/prototype/toString/S15.3.4.2_A13.js @@ -0,0 +1,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); |