* test/src/timefns-tests.el (time-equal-p-NaN-NaN): New test.
/* Compare nil to nil correctly, and handle other eq values quicker
while we're at it. Compare here rather than earlier, to handle
- NaNs and check formats. */
+ NaNs. This means (time-equal-p X X) does not signal an error if
+ X is not a valid time value, but that's OK. */
if (EQ (a, b))
return 0;
(ert-deftest time-equal-p-nil-nil ()
(should (time-equal-p nil nil)))
+(ert-deftest time-equal-p-NaN-NaN ()
+ (let ((x 0.0e+NaN))
+ (should (not (time-equal-p x x)))))
+
(ert-deftest time-arith-tests ()
(let ((time-values (list 0 -1 1 0.0 -0.0 -1.0 1.0
most-negative-fixnum most-positive-fixnum