aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/floatfns-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/floatfns-tests.el')
-rw-r--r--test/src/floatfns-tests.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/src/floatfns-tests.el b/test/src/floatfns-tests.el
index d41b08f7965..9a382058b43 100644
--- a/test/src/floatfns-tests.el
+++ b/test/src/floatfns-tests.el
@@ -70,6 +70,11 @@
70 (should (= n (floor n))) 70 (should (= n (floor n)))
71 (should (= n (round n))) 71 (should (= n (round n)))
72 (should (= n (truncate n))) 72 (should (= n (truncate n)))
73 (let ((-n (- n))
74 (f (float n))
75 (-f (- (float n))))
76 (should (= 1 (round n f) (round -n -f) (round f n) (round -f -n)))
77 (should (= -1 (round -n f) (round n -f) (round f -n) (round -f n))))
73 (dolist (d ns) 78 (dolist (d ns)
74 (let ((q (/ n d)) 79 (let ((q (/ n d))
75 (r (% n d)) 80 (r (% n d))