Bignum Tests: move ModOperationArchSplit to common
The class BignumModRawOperationArchSplit has functionality that are
needed in other modules, therefore moving it to bignum_common.
Signed-off-by: Janos Follath <janos.follath@arm.com>
diff --git a/scripts/mbedtls_dev/bignum_mod_raw.py b/scripts/mbedtls_dev/bignum_mod_raw.py
index 884e2ef..58a93fc 100644
--- a/scripts/mbedtls_dev/bignum_mod_raw.py
+++ b/scripts/mbedtls_dev/bignum_mod_raw.py
@@ -25,27 +25,6 @@
"""Target for bignum mod_raw test case generation."""
target_basename = 'test_suite_bignum_mod_raw.generated'
-class BignumModRawOperationArchSplit(bignum_common.ModOperationCommon,
- BignumModRawTarget):
- #pylint: disable=abstract-method
- """Common features for bignum mod raw operations where the result depends on
- the limb size."""
-
- limb_sizes = [32, 64] # type: List[int]
-
- def __init__(self, val_n: str, val_a: str, val_b: str = "0", bits_in_limb: int = 64) -> None:
- super().__init__(val_n=val_n, val_a=val_a, val_b=val_b, bits_in_limb=bits_in_limb)
-
- if bits_in_limb not in self.limb_sizes:
- raise ValueError("Invalid number of bits in limb!")
-
- self.dependencies = ["MBEDTLS_HAVE_INT{:d}".format(bits_in_limb)]
-
- @classmethod
- def generate_function_tests(cls) -> Iterator[test_case.TestCase]:
- for a_value, b_value in cls.get_value_pairs():
- for bil in cls.limb_sizes:
- yield cls(a_value, b_value, bits_in_limb=bil).create_test_case()
# BEGIN MERGE SLOT 1
# END MERGE SLOT 1
@@ -71,7 +50,8 @@
# END MERGE SLOT 6
# BEGIN MERGE SLOT 7
-class BignumModRawConvertToMont(BignumModRawOperationArchSplit):
+class BignumModRawConvertToMont(bignum_common.ModOperationCommonArchSplit,
+ BignumModRawTarget):
""" Test cases for mpi_mod_raw_to_mont_rep(). """
test_function = "mpi_mod_raw_to_mont_rep"