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:
parent
0cd8967ba1
commit
87df373e0e
3 changed files with 6 additions and 10 deletions
|
@ -17,6 +17,7 @@
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from typing import Iterator, List, Tuple, TypeVar
|
from typing import Iterator, List, Tuple, TypeVar
|
||||||
|
|
||||||
|
from . import test_case
|
||||||
from . import test_data_generation
|
from . import test_data_generation
|
||||||
|
|
||||||
T = TypeVar('T') #pylint: disable=invalid-name
|
T = TypeVar('T') #pylint: disable=invalid-name
|
||||||
|
@ -122,6 +123,11 @@ class OperationCommon(test_data_generation.BaseTest):
|
||||||
)
|
)
|
||||||
yield from cls.input_cases
|
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
|
# BEGIN MERGE SLOT 1
|
||||||
|
|
||||||
# END MERGE SLOT 1
|
# END MERGE SLOT 1
|
||||||
|
|
|
@ -144,11 +144,6 @@ class BignumCoreOperation(BignumCoreTarget, bignum_common.OperationCommon,
|
||||||
)
|
)
|
||||||
return super().description()
|
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):
|
class BignumCoreOperationArchSplit(BignumCoreOperation):
|
||||||
#pylint: disable=abstract-method
|
#pylint: disable=abstract-method
|
||||||
|
|
|
@ -132,11 +132,6 @@ class BignumOperation(bignum_common.OperationCommon, BignumTarget,
|
||||||
tmp = "large " + tmp
|
tmp = "large " + tmp
|
||||||
return 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):
|
class BignumCmp(BignumOperation):
|
||||||
"""Test cases for bignum value comparison."""
|
"""Test cases for bignum value comparison."""
|
||||||
|
|
Loading…
Reference in a new issue