From c5d930dad1cddad7d708dbe39b8ebd7e245717af Mon Sep 17 00:00:00 2001 From: mhostetter Date: Thu, 12 May 2022 09:45:38 -0400 Subject: [PATCH] Increase NTT code coverage --- tests/fields/test_ntt.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/fields/test_ntt.py b/tests/fields/test_ntt.py index 0e1446db9..61288ae18 100644 --- a/tests/fields/test_ntt.py +++ b/tests/fields/test_ntt.py @@ -24,6 +24,8 @@ def test_ntt_exceptions(): galois.ntt([1, 2, 3, 4], size=6.0) with pytest.raises(TypeError): galois.ntt([1, 2, 3, 4], modulus=3*256 + 1.0) + with pytest.raises(TypeError): + galois.ntt([1, 2, 3, 4], forward=1.0) with pytest.raises(ValueError): GF = galois.GF(2**8) # Invalid field for NTTs @@ -32,6 +34,10 @@ def test_ntt_exceptions(): galois.ntt([1, 2, 3, 4], size=3) with pytest.raises(ValueError): galois.ntt([1, 2, 3, 40], modulus=13) + with pytest.raises(ValueError): + galois.ntt([1, 2, 3, 40], modulus=43) + with pytest.raises(ValueError): + galois.ntt([1, 2, 3, 4], modulus=3*256 + 2) @pytest.mark.parametrize(["x", "p", "X"], NTT_LUTS)