blob: 66f36974821a798b97328e6813579a2672d39e80 [file] [log] [blame]
// Copyright 2020 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-number.prototype.tostring
description: >
Else, let radixNumber be ? ToInteger(radix).
---*/
var poisoned = {
valueOf() {
throw new Test262Error();
}
};
assert.throws(Test262Error, () => {
0..toString(poisoned);
});
assert.throws(Test262Error, () => {
1..toString(poisoned);
});
assert.throws(Test262Error, () => {
NaN.toString(poisoned);
});
assert.throws(Test262Error, () => {
Infinity.toString(poisoned);
});