1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
6 We overload valueOf method so it return non Primitive value and toString method so it return non Primitive value too
7 Thus [[DefaultValue]] must generate TypeError error
10 Try to overload toString and valueOf methods, they returned new
20 toString: function() {
25 throw new Test262Error('#1.1: var __obj = {valueOf:function(){return new Object;},toNumber: function() {return new Object();}}; Number(__obj) throw TypeError. Actual: ' + (Number(__obj)));
30 e instanceof TypeError,
32 'The result of evaluating (e instanceof TypeError) is expected to be true'