Looking in detail at the mcel test, I noticed this obvious typo.
The test was testing much fewer 3-character combinations than intended.

This patch fixes it. It increases the execution time of
test-mcel-[245].sh from ca. 4 seconds to 15-20 seconds (in a build
with -O0), which should be acceptable.


2024-05-25  Bruno Haible  <br...@clisp.org>

        mcel tests: Fix typo.
        * tests/test-mcel.c (main): Increment j instead of i.

diff --git a/tests/test-mcel.c b/tests/test-mcel.c
index 7458fa472c..ab6b7dd8d3 100644
--- a/tests/test-mcel.c
+++ b/tests/test-mcel.c
@@ -109,7 +109,7 @@ main (void)
     }
 
   for (int i = CHAR_MIN; i <= CHAR_MAX; i++)
-    for (int j = CHAR_MIN; i <= CHAR_MAX; i++)
+    for (int j = CHAR_MIN; j <= CHAR_MAX; j++)
       for (int k = CHAR_MIN; k <= CHAR_MAX; k++)
         {
           char const ijk[] = {i, j, k};




Reply via email to