Skip to content

Commit

Permalink
Add unit test with example from #194
Browse files Browse the repository at this point in the history
  • Loading branch information
iyanmv authored and mhostetter committed Nov 5, 2021
1 parent 48a4ad7 commit ba217ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/polys/test_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def test_sparse_poly_to_str():
def test_str_to_sparse_poly():
# Over GF(2)
assert galois._poly_conversion.str_to_sparse_poly("x^2 + 1") == ([2, 0], [1, 1])
assert galois._poly_conversion.str_to_sparse_poly("1 - x^2") == ([0, 2], [1, -1])
assert galois._poly_conversion.str_to_sparse_poly("x**2 + 1") == ([2, 0], [1, 1])
assert galois._poly_conversion.str_to_sparse_poly("y^2 + y + 1") == ([2, 1, 0], [1, 1, 1])
assert galois._poly_conversion.str_to_sparse_poly("y**2 + y**1 + 1*y**0") == ([2, 1, 0], [1, 1, 1])
Expand Down

0 comments on commit ba217ff

Please sign in to comment.