| function assert(a, message) { |
| throw new Error(message); |
| function assertThrowTypeError(a, b, message) { |
| assert(false, message + ": Should throw TypeError, but executed without exception"); |
| assert(e instanceof TypeError, message + ": expected TypeError, got: " + e); |
| valueOf: function () { throw new Error("Oops"); } |
| assertThrowTypeError(Symbol("3"), o, "Symbol + Object should throw TypeError"); |
| assert(false, message + ": Should throw Error, but executed without exception"); |
| assert(e.message === "Oops","Expected Error('Oops'), got: " + e); |