bignum_mod_raw.py: Added a filtering logic to BignumModRawConvertRep.generate_function_tests()

This patch introduces a hybrid approach to input_styles, and will remove the
dependency requirements from test cases with `ModulusRepresentation.OPT_RED`

As a result it is reducing testing input duplication.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
Minos Galanakis 2022-12-21 17:41:30 +00:00
parent afa7c04105
commit 342b9a903d

View file

@ -140,6 +140,11 @@ class BignumModRawConvertRep(bignum_common.ModOperationCommon,
for bil in cls.limb_sizes:
test_object = cls(n, a, bits_in_limb=bil)
test_object.set_representation(rep)
#Filters out the duplicate
if rep == bignum_common.ModulusRepresentation.OPT_RED:
test_object.dependencies= []
if bil == 64:
continue
if test_object.is_valid:
yield test_object.create_test_case()