diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2025-02-17 21:58:53 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2025-02-17 22:46:56 +0100 |
commit | afbf932106fdd1043b0debe9fc9134e031e4c9a6 (patch) | |
tree | 2bbd79a4e77be4e02dbf2c37d223896f16236762 /test/lisp/emacs-lisp | |
parent | 1d27028df803e4dc1c063db5593222311838e051 (diff) | |
download | emacs-afbf932106fdd1043b0debe9fc9134e031e4c9a6.tar.gz emacs-afbf932106fdd1043b0debe9fc9134e031e4c9a6.tar.bz2 emacs-afbf932106fdd1043b0debe9fc9134e031e4c9a6.zip |
New functions plusp and minusp
* lisp/emacs-lisp/cl-lib.el (cl-plusp, cl-minusp): Move from here...
* lisp/subr.el (plusp, minusp): ...to here. Make old names into
aliases, documented as deprecated. Add type declarations. Change from
defsubst to regular functions with compiler macros.
* lisp/obsolete/cl.el: Don't alias plusp and minusp.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-plusp)
(cl-lib-test-minusp): Move tests from here...
* test/lisp/subr-tests.el (subr-test-plusp, subr-test-minusp):
...to here.
* doc/lispref/numbers.texi (Predicates on Numbers): Document plusp
and minusp.
* doc/misc/cl.texi (Predicates on Numbers): Delete cl-plusp and
cl-minusp.
* lisp/emacs-lisp/shortdoc.el (number): Document plusp and minusp
instead of cl-plusp and cl-minusp.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/cl-lib-tests.el | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el index 607161c6a7c..ff19ec74a43 100644 --- a/test/lisp/emacs-lisp/cl-lib-tests.el +++ b/test/lisp/emacs-lisp/cl-lib-tests.el @@ -79,38 +79,6 @@ (should (= (cl-decf (alist-get 'a alist 0)) -1)) (should (= (alist-get 'a alist 0) -1)))) -(ert-deftest cl-lib-test-plusp () - (should-not (cl-plusp -1.0e+INF)) - (should-not (cl-plusp -1.5e2)) - (should-not (cl-plusp -3.14)) - (should-not (cl-plusp -1)) - (should-not (cl-plusp -0.0)) - (should-not (cl-plusp 0)) - (should-not (cl-plusp 0.0)) - (should-not (cl-plusp -0.0e+NaN)) - (should-not (cl-plusp 0.0e+NaN)) - (should (cl-plusp 1)) - (should (cl-plusp 3.14)) - (should (cl-plusp 1.5e2)) - (should (cl-plusp 1.0e+INF)) - (should-error (cl-plusp "42") :type 'wrong-type-argument)) - -(ert-deftest cl-lib-test-minusp () - (should (cl-minusp -1.0e+INF)) - (should (cl-minusp -1.5e2)) - (should (cl-minusp -3.14)) - (should (cl-minusp -1)) - (should-not (cl-minusp -0.0)) - (should-not (cl-minusp 0)) - (should-not (cl-minusp 0.0)) - (should-not (cl-minusp -0.0e+NaN)) - (should-not (cl-minusp 0.0e+NaN)) - (should-not (cl-minusp 1)) - (should-not (cl-minusp 3.14)) - (should-not (cl-minusp 1.5e2)) - (should-not (cl-minusp 1.0e+INF)) - (should-error (cl-minusp "-42") :type 'wrong-type-argument)) - (ert-deftest cl-digit-char-p () (should (eql 3 (cl-digit-char-p ?3))) (should (eql 10 (cl-digit-char-p ?a 11))) |