From 2b87659b26e3063103274eb21a149a92b664a51a Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 4 May 2022 22:16:45 -0700 Subject: [PATCH] change test_cldivrem to check all input values for each width --- gf_reference/test_cl_gfb_gfp.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gf_reference/test_cl_gfb_gfp.py b/gf_reference/test_cl_gfb_gfp.py index 87e22cb..b4db911 100644 --- a/gf_reference/test_cl_gfb_gfp.py +++ b/gf_reference/test_cl_gfb_gfp.py @@ -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) -- 2.30.2