Commit Graph

8 Commits

Author SHA1 Message Date
Kenn Sebesta 571f8d1d0e [Unit test][Utils] Add unit test for `utils_saturate_vector_2d()` 2022-03-25 09:41:02 -04:00
Kenn Sebesta 484215c2e6 [Unit tests][Utils_math] Use `EXPECT_FLOAT_EQ` instead of `EXPECT_NEAR`
EXPECT_FLOAT_EQ verifies that the two float values val1 and val2 are
approximately equal, to within 4 ULPs from each other. (Where ULP means
Unit in the Last Place.)
2022-03-25 09:06:55 -04:00
Kenn Sebesta a85f1252f5 [Unit test] Adjust values in and out of range
The contract is `-pi <= angle < pi`
2022-03-25 09:04:18 -04:00
Kenn Sebesta 52c15f3988 [Unit test] Add warning for promotion to double
This mirrors the real compiler settings.
2022-03-25 09:04:18 -04:00
Kenn Sebesta c32f70758c [Unit tests][Utils] Improve comments and test cases 2022-03-25 08:39:53 -04:00
Kenn Sebesta 754a8460e2 [Unit tests][Utils_math] Fix test ranges
Now that the `utils_norm_angle_rad()` range was fixed, change the unit test
to reflect the correct [-pi,pi) range.
2022-03-25 08:20:52 -04:00
Kenn Sebesta caed3de872 [Unit tests][Utils_math] Fix file paths
The unit test location is `utils_math.c/.h` not `math_utils.c/.h`.
2022-03-25 08:19:29 -04:00
Kenn Sebesta af2b278a8b [Unit tests][Utils_math] Fix location
The unit test location is `utils_math` not `math_utils`.
2022-03-25 08:17:57 -04:00