diff options
| author | Paul Eggert | 2017-03-05 13:29:28 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-03-05 13:31:33 -0800 |
| commit | 53f3dd66f12660a47018fc03d50d460787ab6f64 (patch) | |
| tree | ba06844571bec80b8f0258aee30640790e73b918 /test/src | |
| parent | 788a5b8447253fdbbb171d3219acbd7600bb465a (diff) | |
| download | emacs-53f3dd66f12660a47018fc03d50d460787ab6f64.tar.gz emacs-53f3dd66f12660a47018fc03d50d460787ab6f64.zip | |
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/src')
| -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 @@ | |||
| 28 | (ert-deftest logb-extreme-fixnum () | 28 | (ert-deftest logb-extreme-fixnum () |
| 29 | (should (= (logb most-negative-fixnum) (1+ (logb most-positive-fixnum))))) | 29 | (should (= (logb most-negative-fixnum) (1+ (logb most-positive-fixnum))))) |
| 30 | 30 | ||
| 31 | (ert-deftest fround-fixnum () | ||
| 32 | (should-error (ffloor 0) :type 'wrong-type-argument) | ||
| 33 | (should-error (fceiling 0) :type 'wrong-type-argument) | ||
| 34 | (should-error (ftruncate 0) :type 'wrong-type-argument) | ||
| 35 | (should-error (fround 0) :type 'wrong-type-argument)) | ||
| 36 | |||
| 31 | (provide 'floatfns-tests) | 37 | (provide 'floatfns-tests) |