diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/test262/built-ins/Object/prototype/valueOf/S15.2.4.4_A13.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/prototype/valueOf/S15.2.4.4_A13.js b/js/src/tests/test262/built-ins/Object/prototype/valueOf/S15.2.4.4_A13.js new file mode 100644 index 0000000000..3a9d28b0f2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/prototype/valueOf/S15.2.4.4_A13.js @@ -0,0 +1,16 @@ +// Copyright 2011 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Let O be the result of calling ToObject passing the this value as the + argument. +es5id: 15.2.4.4_A13 +description: Checking Object.prototype.valueOf invoked by the 'call' property. +---*/ + +assert.throws(TypeError, function() { + Object.prototype.valueOf.call(null); +}, 'Object.prototype.valueOf.call(null) throws a TypeError exception'); + +reportCompare(0, 0); |