Упрощение тестов
This commit is contained in:
parent
fcf793c758
commit
7f242c4b63
71 changed files with 518 additions and 943 deletions
|
|
@ -27,7 +27,7 @@ void test_is_unit_fp32()
|
|||
// Testing unit values:
|
||||
for (int i = 0; i < _TEST_FP32_UNIT_NUMBERS_AMOUNT; i++) {
|
||||
if (!bgc_is_unit_fp32(_TEST_FP32_UNIT_NUMBERS[i])) {
|
||||
print_testing_failed("A unit value was not recognized");
|
||||
print_testing_error("A unit value was not recognized");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ void test_is_unit_fp32()
|
|||
// Testing non-unit values:
|
||||
for (int i = 0; i < _TEST_FP32_NONUNIT_NUMBERS_AMOUNT; i++) {
|
||||
if (bgc_is_unit_fp32(_TEST_FP32_NONUNIT_NUMBERS[i])) {
|
||||
print_testing_failed("A non-unit value was recognized as a unit value");
|
||||
print_testing_error("A non-unit value was recognized as a unit value");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ void test_is_unit_fp64()
|
|||
// Testing unit values:
|
||||
for (int i = 0; i < _TEST_FP64_UNIT_NUMBERS_AMOUNT; i++) {
|
||||
if (!bgc_is_unit_fp64(_TEST_FP64_UNIT_NUMBERS[i])) {
|
||||
print_testing_failed("A unit value was not recognized");
|
||||
print_testing_error("A unit value was not recognized");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ void test_is_unit_fp64()
|
|||
// Testing non-unit values:
|
||||
for (int i = 0; i < _TEST_FP64_NONUNIT_NUMBERS_AMOUNT; i++) {
|
||||
if (bgc_is_unit_fp64(_TEST_FP64_NONUNIT_NUMBERS[i])) {
|
||||
print_testing_failed("A non-unit value was recognized as a unit value");
|
||||
print_testing_error("A non-unit value was recognized as a unit value");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ void test_is_sqare_unit_fp32()
|
|||
// Testing unit values:
|
||||
for (int i = 0; i < _TEST_FP32_DATA_SQUARE_UNIT_AMOUNT; i++) {
|
||||
if (!bgc_is_sqare_unit_fp32(_TEST_FP32_DATA_SQUARE_UNIT[i])) {
|
||||
print_testing_failed("A unit value was not recognized");
|
||||
print_testing_error("A square unit value was not recognized");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ void test_is_sqare_unit_fp32()
|
|||
// Testing non-unit values:
|
||||
for (int i = 0; i < _TEST_FP32_DATA_SQUARE_NONUNIT_AMOUNT; i++) {
|
||||
if (bgc_is_sqare_unit_fp32(_TEST_FP32_DATA_SQUARE_NONUNIT[i])) {
|
||||
print_testing_failed("A non-unit value was recognized as a unit value");
|
||||
print_testing_error("A non-unit value was recognized as a square unit value");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ void test_is_sqare_unit_fp64()
|
|||
// Testing unit values:
|
||||
for (int i = 0; i < _TEST_FP64_DATA_SQUARE_UNIT_AMOUNT; i++) {
|
||||
if (!bgc_is_sqare_unit_fp64(_TEST_FP64_DATA_SQUARE_UNIT[i])) {
|
||||
print_testing_failed();
|
||||
print_testing_error("A square unit value was not recognized");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ void test_is_sqare_unit_fp64()
|
|||
// Testing non-unit values:
|
||||
for (int i = 0; i < _TEST_FP64_DATA_SQUARE_NONUNIT_AMOUNT; i++) {
|
||||
if (bgc_is_sqare_unit_fp64(_TEST_FP64_DATA_SQUARE_NONUNIT[i])) {
|
||||
print_testing_failed("A non-unit value was recognized as a unit value");
|
||||
print_testing_error("A non-unit value was recognized as a square unit value");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -173,6 +173,4 @@ void test_is_unit()
|
|||
|
||||
test_is_sqare_unit_fp32();
|
||||
test_is_sqare_unit_fp64();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue