From 733ead950317f5a8026a984d0b46c41175643e59 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 24 Feb 2025 18:38:28 +0100 Subject: [PATCH] ; Fix thinko in subr-test-zerop * test/lisp/subr-tests.el (subr-test-zerop): Fix test. Reported by Pip Cet . (cherry picked from commit 3f72af997308db3160f05ace47602f1f2b8afd9c) --- test/lisp/subr-tests.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 5684a08254d..702502627f2 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -39,8 +39,8 @@ (should-not (zerop 0.0e+NaN)) (should-not (zerop float-pi)) (should-not (zerop 1.0e+INF)) - (should-not (zerop (random most-positive-fixnum))) - (should-not (zerop (- (random (- most-negative-fixnum))))) + (should-not (zerop (1+ (random most-positive-fixnum)))) + (should-not (zerop (- (1- (random (- most-negative-fixnum)))))) (should-not (zerop (1+ most-positive-fixnum))) (should-not (zerop (1- most-negative-fixnum))) (should-error (zerop "-5") :type 'wrong-type-argument)) -- 2.39.5