Добавлено несколько модульных тестов для Vector2, Vector3, Versor
This commit is contained in:
parent
ab4a589e21
commit
86426c9bd5
30 changed files with 1148 additions and 3 deletions
39
basic-geometry-test/tests/vector2/vector2_reset.c
Normal file
39
basic-geometry-test/tests/vector2/vector2_reset.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include "./vector2_reset.h"
|
||||
|
||||
#include "./../../helpers.h"
|
||||
|
||||
int test_bgc_vector2_reset_fp32()
|
||||
{
|
||||
BgcVector2FP32 vector;
|
||||
|
||||
print_testing_name("bgc_vector2_reset_fp32");
|
||||
|
||||
bgc_vector2_reset_fp32(&vector);
|
||||
|
||||
if (vector.x1 != 0.0f || vector.x2 != 0.0f) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCES;
|
||||
}
|
||||
|
||||
int test_bgc_vector2_reset_fp64()
|
||||
{
|
||||
BgcVector2FP64 vector;
|
||||
|
||||
print_testing_name("bgc_vector2_reset_fp64");
|
||||
|
||||
bgc_vector2_reset_fp64(&vector);
|
||||
|
||||
if (vector.x1 != 0.0 || vector.x2 != 0.0) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCES;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue