Модульные тесты для Vector2, Vector3, Quaternion и Versor: is unit, is zero, is identity
This commit is contained in:
parent
47ba771b68
commit
2d8240265c
74 changed files with 999 additions and 348 deletions
|
|
@ -57,6 +57,14 @@
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="tests/quaternion/quaternion_copy.h" />
|
<Unit filename="tests/quaternion/quaternion_copy.h" />
|
||||||
|
<Unit filename="tests/quaternion/quaternion_is_unit.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="tests/quaternion/quaternion_is_unit.h" />
|
||||||
|
<Unit filename="tests/quaternion/quaternion_is_zero.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="tests/quaternion/quaternion_is_zero.h" />
|
||||||
<Unit filename="tests/quaternion/quaternion_reset.c">
|
<Unit filename="tests/quaternion/quaternion_reset.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
|
@ -97,6 +105,10 @@
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="tests/vector2/vector2_copy.h" />
|
<Unit filename="tests/vector2/vector2_copy.h" />
|
||||||
|
<Unit filename="tests/vector2/vector2_is_unit.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="tests/vector2/vector2_is_unit.h" />
|
||||||
<Unit filename="tests/vector2/vector2_is_zero.c">
|
<Unit filename="tests/vector2/vector2_is_zero.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
|
@ -121,6 +133,10 @@
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="tests/vector3/vector3_copy.h" />
|
<Unit filename="tests/vector3/vector3_copy.h" />
|
||||||
|
<Unit filename="tests/vector3/vector3_is_unit.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="tests/vector3/vector3_is_unit.h" />
|
||||||
<Unit filename="tests/vector3/vector3_is_zero.c">
|
<Unit filename="tests/vector3/vector3_is_zero.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
|
@ -153,6 +169,10 @@
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="tests/versor/versor_copy.h" />
|
<Unit filename="tests/versor/versor_copy.h" />
|
||||||
|
<Unit filename="tests/versor/versor_is_identity.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="tests/versor/versor_is_identity.h" />
|
||||||
<Unit filename="tests/versor/versor_reset.c">
|
<Unit filename="tests/versor/versor_reset.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,8 @@
|
||||||
<ClCompile Include="main.c" />
|
<ClCompile Include="main.c" />
|
||||||
<ClCompile Include="tests\quaternion.c" />
|
<ClCompile Include="tests\quaternion.c" />
|
||||||
<ClCompile Include="tests\quaternion\quaternion_copy.c" />
|
<ClCompile Include="tests\quaternion\quaternion_copy.c" />
|
||||||
|
<ClCompile Include="tests\quaternion\quaternion_is_unit.c" />
|
||||||
|
<ClCompile Include="tests\quaternion\quaternion_is_zero.c" />
|
||||||
<ClCompile Include="tests\quaternion\quaternion_reset.c" />
|
<ClCompile Include="tests\quaternion\quaternion_reset.c" />
|
||||||
<ClCompile Include="tests\quaternion\quaternion_set_to_identity.c" />
|
<ClCompile Include="tests\quaternion\quaternion_set_to_identity.c" />
|
||||||
<ClCompile Include="tests\quaternion\quaternion_set_values.c" />
|
<ClCompile Include="tests\quaternion\quaternion_set_values.c" />
|
||||||
|
|
@ -161,12 +163,14 @@
|
||||||
<ClCompile Include="tests\utilities\is_unit.c" />
|
<ClCompile Include="tests\utilities\is_unit.c" />
|
||||||
<ClCompile Include="tests\utilities\is_zero.c" />
|
<ClCompile Include="tests\utilities\is_zero.c" />
|
||||||
<ClCompile Include="tests\vector2.c" />
|
<ClCompile Include="tests\vector2.c" />
|
||||||
|
<ClCompile Include="tests\vector2\vector2_is_unit.c" />
|
||||||
<ClCompile Include="tests\vector2\vector2_is_zero.c" />
|
<ClCompile Include="tests\vector2\vector2_is_zero.c" />
|
||||||
<ClCompile Include="tests\vector2\vector2_copy.c" />
|
<ClCompile Include="tests\vector2\vector2_copy.c" />
|
||||||
<ClCompile Include="tests\vector2\vector2_reset.c" />
|
<ClCompile Include="tests\vector2\vector2_reset.c" />
|
||||||
<ClCompile Include="tests\vector2\vector2_set_values.c" />
|
<ClCompile Include="tests\vector2\vector2_set_values.c" />
|
||||||
<ClCompile Include="tests\vector2\vector2_swap.c" />
|
<ClCompile Include="tests\vector2\vector2_swap.c" />
|
||||||
<ClCompile Include="tests\vector3.c" />
|
<ClCompile Include="tests\vector3.c" />
|
||||||
|
<ClCompile Include="tests\vector3\vector3_is_unit.c" />
|
||||||
<ClCompile Include="tests\vector3\vector3_is_zero.c" />
|
<ClCompile Include="tests\vector3\vector3_is_zero.c" />
|
||||||
<ClCompile Include="tests\vector3\vector3_copy.c" />
|
<ClCompile Include="tests\vector3\vector3_copy.c" />
|
||||||
<ClCompile Include="tests\vector3\vector3_swap.c" />
|
<ClCompile Include="tests\vector3\vector3_swap.c" />
|
||||||
|
|
@ -174,6 +178,7 @@
|
||||||
<ClCompile Include="tests\vector3\vector3_set_values.c" />
|
<ClCompile Include="tests\vector3\vector3_set_values.c" />
|
||||||
<ClCompile Include="tests\versor.c" />
|
<ClCompile Include="tests\versor.c" />
|
||||||
<ClCompile Include="tests\versor\versor_copy.c" />
|
<ClCompile Include="tests\versor\versor_copy.c" />
|
||||||
|
<ClCompile Include="tests\versor\versor_is_identity.c" />
|
||||||
<ClCompile Include="tests\versor\versor_swap.c" />
|
<ClCompile Include="tests\versor\versor_swap.c" />
|
||||||
<ClCompile Include="tests\versor\versor_combine.c" />
|
<ClCompile Include="tests\versor\versor_combine.c" />
|
||||||
<ClCompile Include="tests\versor\versor_reset.c" />
|
<ClCompile Include="tests\versor\versor_reset.c" />
|
||||||
|
|
@ -184,6 +189,8 @@
|
||||||
<ClInclude Include="helpers.h" />
|
<ClInclude Include="helpers.h" />
|
||||||
<ClInclude Include="tests\quaternion.h" />
|
<ClInclude Include="tests\quaternion.h" />
|
||||||
<ClInclude Include="tests\quaternion\quaternion_copy.h" />
|
<ClInclude Include="tests\quaternion\quaternion_copy.h" />
|
||||||
|
<ClInclude Include="tests\quaternion\quaternion_is_unit.h" />
|
||||||
|
<ClInclude Include="tests\quaternion\quaternion_is_zero.h" />
|
||||||
<ClInclude Include="tests\quaternion\quaternion_reset.h" />
|
<ClInclude Include="tests\quaternion\quaternion_reset.h" />
|
||||||
<ClInclude Include="tests\quaternion\quaternion_set_to_identity.h" />
|
<ClInclude Include="tests\quaternion\quaternion_set_to_identity.h" />
|
||||||
<ClInclude Include="tests\quaternion\quaternion_set_values.h" />
|
<ClInclude Include="tests\quaternion\quaternion_set_values.h" />
|
||||||
|
|
@ -193,12 +200,14 @@
|
||||||
<ClInclude Include="tests\utilities\is_unit.h" />
|
<ClInclude Include="tests\utilities\is_unit.h" />
|
||||||
<ClInclude Include="tests\utilities\is_zero.h" />
|
<ClInclude Include="tests\utilities\is_zero.h" />
|
||||||
<ClInclude Include="tests\vector2.h" />
|
<ClInclude Include="tests\vector2.h" />
|
||||||
|
<ClInclude Include="tests\vector2\vector2_is_unit.h" />
|
||||||
<ClInclude Include="tests\vector2\vector2_is_zero.h" />
|
<ClInclude Include="tests\vector2\vector2_is_zero.h" />
|
||||||
<ClInclude Include="tests\vector2\vector2_copy.h" />
|
<ClInclude Include="tests\vector2\vector2_copy.h" />
|
||||||
<ClInclude Include="tests\vector2\vector2_reset.h" />
|
<ClInclude Include="tests\vector2\vector2_reset.h" />
|
||||||
<ClInclude Include="tests\vector2\vector2_set_values.h" />
|
<ClInclude Include="tests\vector2\vector2_set_values.h" />
|
||||||
<ClInclude Include="tests\vector2\vector2_swap.h" />
|
<ClInclude Include="tests\vector2\vector2_swap.h" />
|
||||||
<ClInclude Include="tests\vector3.h" />
|
<ClInclude Include="tests\vector3.h" />
|
||||||
|
<ClInclude Include="tests\vector3\vector3_is_unit.h" />
|
||||||
<ClInclude Include="tests\vector3\vector3_is_zero.h" />
|
<ClInclude Include="tests\vector3\vector3_is_zero.h" />
|
||||||
<ClInclude Include="tests\vector3\vector3_copy.h" />
|
<ClInclude Include="tests\vector3\vector3_copy.h" />
|
||||||
<ClInclude Include="tests\vector3\vector3_swap.h" />
|
<ClInclude Include="tests\vector3\vector3_swap.h" />
|
||||||
|
|
@ -206,6 +215,7 @@
|
||||||
<ClInclude Include="tests\vector3\vector3_set_values.h" />
|
<ClInclude Include="tests\vector3\vector3_set_values.h" />
|
||||||
<ClInclude Include="tests\versor.h" />
|
<ClInclude Include="tests\versor.h" />
|
||||||
<ClInclude Include="tests\versor\versor_copy.h" />
|
<ClInclude Include="tests\versor\versor_copy.h" />
|
||||||
|
<ClInclude Include="tests\versor\versor_is_identity.h" />
|
||||||
<ClInclude Include="tests\versor\versor_swap.h" />
|
<ClInclude Include="tests\versor\versor_swap.h" />
|
||||||
<ClInclude Include="tests\versor\versor_combine.h" />
|
<ClInclude Include="tests\versor\versor_combine.h" />
|
||||||
<ClInclude Include="tests\versor\versor_reset.h" />
|
<ClInclude Include="tests\versor\versor_reset.h" />
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,21 @@
|
||||||
<ClCompile Include="tests\vector2\vector2_is_zero.c">
|
<ClCompile Include="tests\vector2\vector2_is_zero.c">
|
||||||
<Filter>tests\vector2</Filter>
|
<Filter>tests\vector2</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="tests\quaternion\quaternion_is_zero.c">
|
||||||
|
<Filter>tests\quaternion</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="tests\quaternion\quaternion_is_unit.c">
|
||||||
|
<Filter>tests\quaternion</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="tests\vector3\vector3_is_unit.c">
|
||||||
|
<Filter>tests\vector3</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="tests\vector2\vector2_is_unit.c">
|
||||||
|
<Filter>tests\vector2</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="tests\versor\versor_is_identity.c">
|
||||||
|
<Filter>tests\versor</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="helpers.h" />
|
<ClInclude Include="helpers.h" />
|
||||||
|
|
@ -180,6 +195,21 @@
|
||||||
<ClInclude Include="tests\vector2\vector2_is_zero.h">
|
<ClInclude Include="tests\vector2\vector2_is_zero.h">
|
||||||
<Filter>tests\vector2</Filter>
|
<Filter>tests\vector2</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="tests\quaternion\quaternion_is_zero.h">
|
||||||
|
<Filter>tests\quaternion</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="tests\quaternion\quaternion_is_unit.h">
|
||||||
|
<Filter>tests\quaternion</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="tests\vector3\vector3_is_unit.h">
|
||||||
|
<Filter>tests\vector3</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="tests\vector2\vector2_is_unit.h">
|
||||||
|
<Filter>tests\vector2</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="tests\versor\versor_is_identity.h">
|
||||||
|
<Filter>tests\versor</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="tests">
|
<Filter Include="tests">
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,31 @@ int test_quaternion()
|
||||||
{
|
{
|
||||||
print_testing_section("BGC Quaternion");
|
print_testing_section("BGC Quaternion");
|
||||||
|
|
||||||
if (test_bgc_quaternion_reset() != TEST_SUCCES) {
|
if (test_quaternion_reset() != TEST_SUCCES) {
|
||||||
return TEST_FAILED;
|
return TEST_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||