Bignum test: Move identical function to superclass

No intended change in generated test cases.

Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
Janos Follath 2022-11-09 12:31:23 +00:00
parent 0cd8967ba1
commit 87df373e0e
3 changed files with 6 additions and 10 deletions

View file

@ -17,6 +17,7 @@
from abc import abstractmethod
from typing import Iterator, List, Tuple, TypeVar
from . import test_case
from . import test_data_generation
T = TypeVar('T') #pylint: disable=invalid-name
@ -122,6 +123,11 @@ class OperationCommon(test_data_generation.BaseTest):
)
yield from cls.input_cases
@classmethod
def generate_function_tests(cls) -> Iterator[test_case.TestCase]:
for a_value, b_value in cls.get_value_pairs():
yield cls(a_value, b_value).create_test_case()
# BEGIN MERGE SLOT 1
# END MERGE SLOT 1

View file

@ -144,11 +144,6 @@ class BignumCoreOperation(BignumCoreTarget, bignum_common.OperationCommon,
)
return super().description()
@classmethod
def generate_function_tests(cls) -> Iterator[test_case.TestCase]:
for a_value, b_value in cls.get_value_pairs():
yield cls(a_value, b_value).create_test_case()
class BignumCoreOperationArchSplit(BignumCoreOperation):
#pylint: disable=abstract-method

View file

@ -132,11 +132,6 @@ class BignumOperation(bignum_common.OperationCommon, BignumTarget,
tmp = "large " + tmp
return tmp
@classmethod
def generate_function_tests(cls) -> Iterator[test_case.TestCase]:
for a_value, b_value in cls.get_value_pairs():
yield cls(a_value, b_value).create_test_case()
class BignumCmp(BignumOperation):
"""Test cases for bignum value comparison."""