diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-03-05 13:29:28 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-03-05 13:31:33 -0800 |
commit | 53f3dd66f12660a47018fc03d50d460787ab6f64 (patch) | |
tree | ba06844571bec80b8f0258aee30640790e73b918 /test | |
parent | 788a5b8447253fdbbb171d3219acbd7600bb465a (diff) | |
download | emacs-53f3dd66f12660a47018fc03d50d460787ab6f64.tar.gz |
ffloor etc. now accept only floats
* etc/NEWS: Say why.
* src/floatfns.c (Ffceiling, Fffloor, Ffround, Fftruncate):
Require arg to be float.
* test/src/floatfns-tests.el (fround-fixnum): Check this.
Diffstat (limited to 'test')
-rw-r--r-- | test/src/floatfns-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/src/floatfns-tests.el b/test/src/floatfns-tests.el index cdfb8244f52..de3e44314f9 100644 --- a/test/src/floatfns-tests.el +++ b/test/src/floatfns-tests.el @@ -28,4 +28,10 @@ (ert-deftest logb-extreme-fixnum () (should (= (logb most-negative-fixnum) (1+ (logb most-positive-fixnum))))) +(ert-deftest fround-fixnum () + (should-error (ffloor 0) :type 'wrong-type-argument) + (should-error (fceiling 0) :type 'wrong-type-argument) + (should-error (ftruncate 0) :type 'wrong-type-argument) + (should-error (fround 0) :type 'wrong-type-argument)) + (provide 'floatfns-tests) |