projects
/
nmigen-gf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49f1c51
)
change test_cldivrem to check all input values for each width
author
Jacob Lifshay
<programmerjake@gmail.com>
Thu, 5 May 2022 05:16:45 +0000
(22:16 -0700)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Thu, 5 May 2022 05:16:45 +0000
(22:16 -0700)
gf_reference/test_cl_gfb_gfp.py
patch
|
blob
|
history
diff --git
a/gf_reference/test_cl_gfb_gfp.py
b/gf_reference/test_cl_gfb_gfp.py
index 87e22cb5afab9a14f51e94c422f22cd34a698305..b4db911644655b04124e2ef5b1979b28aaa60211 100644
(file)
--- 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)