mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-18 05:42:35 +00:00
Use ADD_SUB_DEFAULT as test input for bignum tests
In BignumCoreAddAndAddIf and BignumCoreSub we use the new dedicated test inputs. Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
parent
7847eaef20
commit
59003c70ae
@ -21,6 +21,7 @@ from typing import Dict, Iterator, List, Tuple
|
|||||||
from . import test_case
|
from . import test_case
|
||||||
from . import test_data_generation
|
from . import test_data_generation
|
||||||
from . import bignum_common
|
from . import bignum_common
|
||||||
|
from .bignum_data import ADD_SUB_DEFAULT
|
||||||
|
|
||||||
class BignumCoreTarget(test_data_generation.BaseTarget):
|
class BignumCoreTarget(test_data_generation.BaseTarget):
|
||||||
#pylint: disable=abstract-method, too-few-public-methods
|
#pylint: disable=abstract-method, too-few-public-methods
|
||||||
@ -176,6 +177,7 @@ class BignumCoreAddAndAddIf(BignumCoreTarget, bignum_common.OperationCommon):
|
|||||||
test_function = "mpi_core_add_and_add_if"
|
test_function = "mpi_core_add_and_add_if"
|
||||||
test_name = "mpi_core_add_and_add_if"
|
test_name = "mpi_core_add_and_add_if"
|
||||||
input_style = "arch_split"
|
input_style = "arch_split"
|
||||||
|
input_values = ADD_SUB_DEFAULT
|
||||||
unique_combinations_only = True
|
unique_combinations_only = True
|
||||||
|
|
||||||
def result(self) -> List[str]:
|
def result(self) -> List[str]:
|
||||||
@ -196,6 +198,7 @@ class BignumCoreSub(BignumCoreTarget, bignum_common.OperationCommon):
|
|||||||
symbol = "-"
|
symbol = "-"
|
||||||
test_function = "mpi_core_sub"
|
test_function = "mpi_core_sub"
|
||||||
test_name = "mbedtls_mpi_core_sub"
|
test_name = "mbedtls_mpi_core_sub"
|
||||||
|
input_values = ADD_SUB_DEFAULT
|
||||||
|
|
||||||
def result(self) -> List[str]:
|
def result(self) -> List[str]:
|
||||||
if self.int_a >= self.int_b:
|
if self.int_a >= self.int_b:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user