Completely allow evaluating -0

This commit is contained in:
Richard van Velzen
2016-05-18 18:49:55 +02:00
parent 27eedbc302
commit bc49dfd27a
2 changed files with 45 additions and 9 deletions

View File

@@ -1,9 +1,39 @@
negative_zero: {
options = { evaluate: true }
input: {
assert.sameValue(-"", -0, '-""');
console.log(
-"",
- -"",
1 / (-0),
1 / (-"")
);
}
expect: {
assert.sameValue(-"", -0, '-""');
console.log(
-0,
0,
1 / (-0),
1 / (-0)
);
}
}
positive_zero: {
options = { evaluate: true }
input: {
console.log(
+"",
+ -"",
1 / (+0),
1 / (+"")
);
}
expect: {
console.log(
0,
-0,
1 / (0),
1 / (0)
);
}
}