]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
next-prime tests: Update unit test after last change.
authorBruno Haible <bruno@clisp.org>
Tue, 15 Jul 2025 08:34:01 +0000 (10:34 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 15 Jul 2025 08:37:08 +0000 (10:37 +0200)
* tests/test-next-prime.c (main): Allow either behaviour.

ChangeLog
tests/test-next-prime.c

index e0fe064d6bcc903141732cc167580e39d6e9f364..53cdcee417a0ea0e48d0be07018d305b596b5249 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-07-15  Bruno Haible  <bruno@clisp.org>
+
+       next-prime tests: Update unit test after last change.
+       * tests/test-next-prime.c (main): Allow either behaviour.
+
 2025-07-14  Karl Berry  <karl@freefriends.org>
 
        epsf.tex: Sync it.
index 5bec1e0eeb73504c30efd168e2d8201bd49b2086..b74257ae83feb50b9e8f5b0676f554653bb97538 100644 (file)
@@ -26,9 +26,9 @@
 int
 main ()
 {
-  ASSERT (next_prime (1) == 11);
-  ASSERT (next_prime (3) == 11);
-  ASSERT (next_prime (7) == 11);
+  ASSERT (next_prime (1) >= 3 && next_prime (1) <= 11);
+  ASSERT (next_prime (3) >= 3 && next_prime (3) <= 11);
+  ASSERT (next_prime (7) >= 7 && next_prime (7) <= 11);
   ASSERT (next_prime (10) == 11);
   ASSERT (next_prime (11) == 11);
   ASSERT (next_prime (12) == 13);