1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Split test generator base class

The class BaseTarget served two purposes:
- track test cases and target files for generation
- provide an abstract base class for individual test groups

Splitting these allows decoupling these two and to have further common
superclasses across targets.

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:14:14 +00:00
parent 821d862159
commit 0cd8967ba1
6 changed files with 35 additions and 28 deletions

View File

@ -17,6 +17,8 @@
from abc import abstractmethod
from typing import Iterator, List, Tuple, TypeVar
from . import test_data_generation
T = TypeVar('T') #pylint: disable=invalid-name
def invmod(a: int, n: int) -> int:
@ -63,8 +65,7 @@ def combination_pairs(values: List[T]) -> List[Tuple[T, T]]:
"""Return all pair combinations from input values."""
return [(x, y) for x in values for y in values]
class OperationCommon:
class OperationCommon(test_data_generation.BaseTest):
"""Common features for bignum binary operations.
This adds functionality common in binary operation tests.