Add a test for Math.max/min on negative zero.
--- a/builtins/Math.maxmin.js Wed Jun 20 13:49:49 2012 +0200
+++ b/builtins/Math.maxmin.js Wed Jul 04 21:10:28 2012 +0200
@@ -44,4 +44,14 @@
test(function() {
assert_equals(Math[aFun]("1"), 1);
}, "Should return a number.");
+ test(function() {
+ var expected = {
+ "max": 0,
+ "min": -0
+ }
+ assert_equals(Math[aFun](0, -0), expected[aFun]);
+ assert_equals(Math[aFun](-0, 0), expected[aFun]);
+ assert_equals(Math[aFun](0, 0), 0);
+ assert_equals(Math[aFun](-0, -0), -0);
+ }, "Should handle negative zero correctly.");
}