[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-27 c2b8ce4: Calc: don't treat nil as an integer (bug#40155)
From: |
Pip Cet |
Subject: |
Re: emacs-27 c2b8ce4: Calc: don't treat nil as an integer (bug#40155) |
Date: |
Sun, 29 Mar 2020 08:20:12 +0000 |
On Sat, Mar 28, 2020 at 11:52 AM Mattias Engdegård
<address@hidden> wrote:
> diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el
> index 784b404..8fffb7c 100644
> --- a/test/lisp/calc/calc-tests.el
> +++ b/test/lisp/calc/calc-tests.el
> @@ -334,6 +334,17 @@ An existing calc stack is reused, otherwise a new one is
> created."
> (should (equal tos '(- (* 2 (var x var-x)) 4)))
> (should (equal trail "pdiv 2 * x - 4\nprem 8 * x + 1\n"))))))
>
> +(ert-deftest calc-Math-integerp ()
> + (should (Math-integerp -7))
> + (should (Math-integerp (ash 1 65)))
> + (should-not (Math-integerp '(float 1 0)))
> + (should-not (Math-integerp nil))
> +
> + (should (Math-num-integerp -7))
> + (should (Math-num-integerp (ash 1 65)))
> + (should (Math-num-integerp '(float 1 0)))
> + (should-not (Math-integerp nil)))
Shouldn't we be testing (Math-num-integerp nil) here? If not, why not?