Упрощение тестов
This commit is contained in:
parent
fcf793c758
commit
7f242c4b63
71 changed files with 518 additions and 943 deletions
|
@ -14,27 +14,25 @@ static const BgcVector3FP32 _TEST_FP32_VECTOR3_LIST[] = {
|
|||
{ -100.0f, 100.0f, -0.001f }
|
||||
};
|
||||
|
||||
int test_vector3_copy_fp32()
|
||||
void test_vector3_copy_fp32()
|
||||
{
|
||||
BgcVector3FP32 vector;
|
||||
|
||||
print_testing_name("bgc_vector3_copy_fp32");
|
||||
|
||||
for (int i = 0; i < _TEST_FP32_VECTOR3_AMOUNT; i++) {
|
||||
|
||||
|
||||
bgc_vector3_copy_fp32(&_TEST_FP32_VECTOR3_LIST[i], &vector);
|
||||
|
||||
if (vector.x1 != _TEST_FP32_VECTOR3_LIST[i].x1 ||
|
||||
vector.x2 != _TEST_FP32_VECTOR3_LIST[i].x2 ||
|
||||
vector.x3 != _TEST_FP32_VECTOR3_LIST[i].x3) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
// ==================== FP64 ==================== //
|
||||
|
@ -47,7 +45,7 @@ static const BgcVector3FP64 _TEST_FP64_VECTOR3_LIST[] = {
|
|||
{ -100.0, 100.0, -0.001 }
|
||||
};
|
||||
|
||||
int test_vector3_copy_fp64()
|
||||
void test_vector3_copy_fp64()
|
||||
{
|
||||
BgcVector3FP64 vector;
|
||||
|
||||
|
@ -61,24 +59,15 @@ int test_vector3_copy_fp64()
|
|||
vector.x2 != _TEST_FP64_VECTOR3_LIST[i].x2 ||
|
||||
vector.x3 != _TEST_FP64_VECTOR3_LIST[i].x3) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
int test_vector3_copy()
|
||||
void test_vector3_copy()
|
||||
{
|
||||
if (test_vector3_copy_fp32() != TEST_SUCCESS) {
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
if (test_vector3_copy_fp64() != TEST_SUCCESS) {
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
return TEST_SUCCESS;
|
||||
test_vector3_copy_fp32();
|
||||
test_vector3_copy_fp64();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue