vedderb / bldc

The VESC motor control firmware
2.22k stars 1.37k forks source link

Update utils unit tests #457

Closed kubark42 closed 2 years ago

kubark42 commented 2 years ago

All the unit test stuff is finally coming together. It runs the way it should now, and no longer trips across the range of utils_norm_angle().

Successful test output below:

vesc % make all_ut_run    
*NOTE*      Sanitized disallowed variable 'TMPDIR' from environment
*NOTE*     Parallel make disabled by all_ut_run target so we have sane console output
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
 TEST RUN    build/unit_tests/utils_math/utils_math.elf
Running main() from /Users/kenz/Documents/vesc/tools/gtest-1.11.0/src/gtest_main.cc
[==========] Running 6 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 3 tests from NormAngle_deg
[ RUN      ] NormAngle_deg.ValInRange
[       OK ] NormAngle_deg.ValInRange (0 ms)
[ RUN      ] NormAngle_deg.ValBelowRange
[       OK ] NormAngle_deg.ValBelowRange (0 ms)
[ RUN      ] NormAngle_deg.ValAboveRange
[       OK ] NormAngle_deg.ValAboveRange (0 ms)
[----------] 3 tests from NormAngle_deg (0 ms total)

[----------] 3 tests from NormAngle_rad
[ RUN      ] NormAngle_rad.ValInRange
[       OK ] NormAngle_rad.ValInRange (0 ms)
[ RUN      ] NormAngle_rad.ValBelowRange
[       OK ] NormAngle_rad.ValBelowRange (0 ms)
[ RUN      ] NormAngle_rad.ValAboveRange
[       OK ] NormAngle_rad.ValAboveRange (0 ms)
[----------] 3 tests from NormAngle_rad (0 ms total)

[----------] Global test environment tear-down
[==========] 6 tests from 2 test suites ran. (0 ms total)
[  PASSED  ] 6 tests.
kenz@Kenzs-MacBook-Air vesc % 
vedderb commented 2 years ago

Very nice!