change test_cldivrem to check all input values for each width
authorJacob Lifshay <programmerjake@gmail.com>
Thu, 5 May 2022 05:16:45 +0000 (22:16 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Thu, 5 May 2022 05:16:45 +0000 (22:16 -0700)
gf_reference/test_cl_gfb_gfp.py

index 87e22cb5afab9a14f51e94c422f22cd34a698305..b4db911644655b04124e2ef5b1979b28aaa60211 100644 (file)
@@ -511,12 +511,10 @@ class TestGFPClass(unittest.TestCase):
 
 class TestCL(unittest.TestCase):
     def test_cldivrem(self):
-        n_width = 8
-        d_width = 4
-        width = max(n_width, d_width)
-        for nv in range(2 ** n_width):
+        width = 6
+        for nv in range(2 ** width):
             n = GF2Poly(unpack_poly(nv))
-            for dv in range(1, 2 ** d_width):
+            for dv in range(1, 2 ** width):
                 d = GF2Poly(unpack_poly(dv))
                 with self.subTest(n=str(n), nv=nv, d=str(d), dv=dv):
                     q_expected, r_expected = divmod(n, d)