Упрощение тестов
This commit is contained in:
parent
fcf793c758
commit
7f242c4b63
71 changed files with 518 additions and 943 deletions
|
|
@ -18,14 +18,14 @@ static const BgcVersorFP32 _TEST_FP32_VERSOR_LIST[] = {
|
|||
{ 0.7071067812f, 0.0f, 0.0f, -0.7071067812f }
|
||||
};
|
||||
|
||||
int test_versor_copy_fp32()
|
||||
void test_versor_copy_fp32()
|
||||
{
|
||||
BgcVersorFP32 versor;
|
||||
|
||||
print_testing_name("bgc_versor_copy_fp32");
|
||||
|
||||
for (int i = 0; i < _TEST_FP32_VERSOR_AMOUNT; i++) {
|
||||
|
||||
|
||||
bgc_versor_copy_fp32(&_TEST_FP32_VERSOR_LIST[i], &versor);
|
||||
|
||||
if (versor.s0 != _TEST_FP32_VERSOR_LIST[i].s0 ||
|
||||
|
|
@ -33,13 +33,11 @@ int test_versor_copy_fp32()
|
|||
versor.x2 != _TEST_FP32_VERSOR_LIST[i].x2 ||
|
||||
versor.x3 != _TEST_FP32_VERSOR_LIST[i].x3) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
// ==================== FP64 ==================== //
|
||||
|
|
@ -56,7 +54,7 @@ static const BgcVersorFP64 _TEST_FP64_VERSOR_LIST[] = {
|
|||
{ 0.7071067811865475, 0.0, 0.0, -0.7071067811865475 }
|
||||
};
|
||||
|
||||
int test_versor_copy_fp64()
|
||||
void test_versor_copy_fp64()
|
||||
{
|
||||
BgcVersorFP64 versor;
|
||||
|
||||
|
|
@ -71,24 +69,15 @@ int test_versor_copy_fp64()
|
|||
versor.x2 != _TEST_FP64_VERSOR_LIST[i].x2 ||
|
||||
versor.x3 != _TEST_FP64_VERSOR_LIST[i].x3) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
int test_versor_copy()
|
||||
void test_versor_copy()
|
||||
{
|
||||
if (test_versor_copy_fp32() != TEST_SUCCESS) {
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
if (test_versor_copy_fp64() != TEST_SUCCESS) {
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
return TEST_SUCCESS;
|
||||
test_versor_copy_fp32();
|
||||
test_versor_copy_fp64();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue