mirror of https://github.com/tc39/test262.git
Harness: properly format negative zero
This commit is contained in:
parent
1e63ce0eae
commit
96cf75770e
|
@ -96,6 +96,10 @@ assert.throws = function (expectedErrorConstructor, func, message) {
|
|||
|
||||
assert._toString = function (value) {
|
||||
try {
|
||||
if (value === 0 && 1 / value === -Infinity) {
|
||||
return '-0';
|
||||
}
|
||||
|
||||
return String(value);
|
||||
} catch (err) {
|
||||
if (err.name === 'TypeError') {
|
||||
|
|
|
@ -18,6 +18,7 @@ try {
|
|||
'" was thrown.'
|
||||
);
|
||||
}
|
||||
assert.notSameValue(err.message.indexOf('-0'), -1);
|
||||
}
|
||||
|
||||
if (threw === false) {
|
||||
|
|
Loading…
Reference in New Issue