gazebosim / sdformat

Simulation Description Format (SDFormat) parser and description files.
http://sdformat.org
Apache License 2.0
166 stars 92 forks source link

Param_TEST: Check return values of Param::Get/Set #1394

Closed scpeters closed 5 months ago

scpeters commented 6 months ago

🦟 Bug fix

Adds more expectations to a unit test

Summary

While investigating how to implement a suggestion added in a comment in https://github.com/gazebosim/sdformat/commit/d3532946bc64fef713b30fbb1ab21a33603bf9dd, I noticed that the UNIT_Param_TEST has many calls to bool Param::Get and bool Param::Set without checking the return value. This adds expectations on the return value of those function calls, which will aid in addressing the aforementioned comment with a behavior change PR on main.

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.42%. Comparing base (ff9b3ad) to head (e960bed). Report is 5 commits behind head on sdf14.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## sdf14 #1394 +/- ## ======================================= Coverage 92.42% 92.42% ======================================= Files 134 134 Lines 17751 17751 ======================================= Hits 16406 16406 Misses 1345 1345 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.