Упрощение тестов
This commit is contained in:
parent
fcf793c758
commit
7f242c4b63
71 changed files with 518 additions and 943 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
// ==================== FP32 ==================== //
|
||||
|
||||
int test_vector3_set_values_fp32()
|
||||
void test_vector3_set_values_fp32()
|
||||
{
|
||||
BgcVector3FP32 vector;
|
||||
|
||||
|
@ -15,32 +15,30 @@ int test_vector3_set_values_fp32()
|
|||
bgc_vector3_set_values_fp32(1.0f, 2.0f, 3.0f, &vector);
|
||||
|
||||
if (vector.x1 != 1.0f || vector.x2 != 2.0f || vector.x3 != 3.0f) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
print_testing_error("First step failed");
|
||||
return;
|
||||
}
|
||||
|
||||
bgc_vector3_set_values_fp32(-3.0f, -5.0f, -7.0f, &vector);
|
||||
|
||||
if (vector.x1 != -3.0f || vector.x2 != -5.0f || vector.x3 != -7.0f) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
print_testing_error("Second step failed");
|
||||
return;
|
||||
}
|
||||
|
||||
bgc_vector3_set_values_fp32(-2.0f, 2.0f, 4.0f, &vector);
|
||||
|
||||
if (vector.x1 != -2.0f || vector.x2 != 2.0f || vector.x3 != 4.0f) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
print_testing_error("Third step failed");
|
||||
return;
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
// ==================== FP64 ==================== //
|
||||
|
||||
int test_vector3_set_values_fp64()
|
||||
void test_vector3_set_values_fp64()
|
||||
{
|
||||
BgcVector3FP64 vector;
|
||||
|
||||
|
@ -50,38 +48,29 @@ int test_vector3_set_values_fp64()
|
|||
bgc_vector3_set_values_fp64(1.0, 2.0, 3.0, &vector);
|
||||
|
||||
if (vector.x1 != 1.0 || vector.x2 != 2.0 || vector.x3 != 3.0) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
print_testing_error("First step failed");
|
||||
return;
|
||||
}
|
||||
|
||||
bgc_vector3_set_values_fp64(-3.0, -5.0, -7.0, &vector);
|
||||
|
||||
if (vector.x1 != -3.0 || vector.x2 != -5.0 || vector.x3 != -7.0) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
print_testing_error("Second step failed");
|
||||
return;
|
||||
}
|
||||
|
||||
bgc_vector3_set_values_fp64(-2.0, 2.0, 4.0, &vector);
|
||||
|
||||
if (vector.x1 != -2.0 || vector.x2 != 2.0 || vector.x3 != 4.0) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
print_testing_error("Third step failed");
|
||||
return;
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCESS;
|
||||
}
|
||||
|
||||
int test_vector3_set_values()
|
||||
void test_vector3_set_values()
|
||||
{
|
||||
if (test_vector3_set_values_fp32() != TEST_SUCCESS) {
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
if (test_vector3_set_values_fp64() != TEST_SUCCESS) {
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
return TEST_SUCCESS;
|
||||
test_vector3_set_values_fp32();
|
||||
test_vector3_set_values_fp64();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue