Упрощение тестов
This commit is contained in:
parent
fcf793c758
commit
7f242c4b63
71 changed files with 518 additions and 943 deletions
|
|
@ -14,14 +14,14 @@ static const BgcQuaternionFP32 _TEST_FP32_QUATERNION_LIST[] = {
|
|||
{ 0.001f, -100.0f, 100.0f, -0.001f }
|
||||
};
|
||||
|
||||
int test_quaternion_copy_fp32()
|
||||
void test_quaternion_copy_fp32()
|
||||
{
|
||||
BgcQuaternionFP32 vector;
|
||||
|
||||
print_testing_name("bgc_quaternion_copy_fp32");
|
||||
|
||||
for (int i = 0; i < _TEST_FP32_QUATERNION_AMOUNT; i++) {
|
||||
|
||||
|
||||
bgc_quaternion_copy_fp32(&_TEST_FP32_QUATERNION_LIST[i], &vector);
|
||||
|
||||
if (vector.s0 != _TEST_FP32_QUATERNION_LIST[i].s0 ||
|
||||
|
|
@ -29,13 +29,11 @@ int test_quaternion_copy_fp32()
|
|||
vector.x2 != _TEST_FP32_QUATERNION_LIST[i].x2 ||
|
||||
vector.x3 != _TEST_FP32_QUATERNION_LIST[i].x3) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
// ==================== FP64 ==================== //
|
||||
|
|
@ -48,7 +46,7 @@ static const BgcQuaternionFP64 _TEST_FP64_QUATERNION_LIST[] = {
|
|||
{ 0.001, -100.0, 100.0, -0.001 }
|
||||
};
|
||||
|
||||
int test_quaternion_copy_fp64()
|
||||
void test_quaternion_copy_fp64()
|
||||
{
|
||||
BgcQuaternionFP64 vector;
|
||||
|
||||
|
|
@ -63,24 +61,15 @@ int test_quaternion_copy_fp64()
|
|||
vector.x2 != _TEST_FP64_QUATERNION_LIST[i].x2 ||
|
||||
vector.x3 != _TEST_FP64_QUATERNION_LIST[i].x3) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
int test_quaternion_copy()
|
||||
void test_quaternion_copy()
|
||||
{
|
||||
if (test_quaternion_copy_fp32() != TEST_SUCCESS) {
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
if (test_quaternion_copy_fp64() != TEST_SUCCESS) {
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
return TEST_SUCCESS;
|
||||
test_quaternion_copy_fp32();
|
||||
test_quaternion_copy_fp64();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue