Добавлено несколько модульных тестов (покрыто примерно 3,2%), небольшое исправление, переименование tantent в tangent pair (тангенсная пара)
This commit is contained in:
parent
9864653787
commit
ab4a589e21
30 changed files with 1433 additions and 155 deletions
41
basic-geometry-test/tests/versor/versor_reset.c
Normal file
41
basic-geometry-test/tests/versor/versor_reset.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#include "./versor_reset.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "./../../helpers.h"
|
||||
|
||||
int test_bgc_versor_reset_fp32()
|
||||
{
|
||||
BgcVersorFP32 versor;
|
||||
|
||||
print_testing_name("bgc_versor_reset_fp32");
|
||||
|
||||
bgc_versor_reset_fp32(&versor);
|
||||
|
||||
if (versor.s0 != 1.0f || versor.x1 != 0.0f || versor.x2 != 0.0f || versor.x3 != 0.0f) {
|
||||
print_testing_failed();
|
||||
return TEST_FAILED;
|
||||
}
|
||||
|
||||
print_testing_success();
|
||||
|
||||
return TEST_SUCCES;
|
||||
}
|
||||
|
||||
int test_bgc_versor_reset_fp64()
|
||||
{
|
||||
BgcVersorFP64 versor;
|
||||
|
||||
print_testing_name("bgc_versor_reset_fp64");
|
||||
|
||||
bgc_versor_reset_fp64(&versor);
|
||||
|
||||
if (versor.s0 != 1.0 || versor.x1 != 0.0 || versor.x2 != 0.0 || versor.x3 != 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