Skip to content

Replace assert with DART_ASSERT#2109

Merged
jslee02 merged 1 commit intomainfrom
feature/dart-assert-macro
Nov 5, 2025
Merged

Replace assert with DART_ASSERT#2109
jslee02 merged 1 commit intomainfrom
feature/dart-assert-macro

Conversation

@jslee02
Copy link
Member

@jslee02 jslee02 commented Nov 5, 2025

Replace all direct uses of the C library assert macro with DART_ASSERT so every build path goes through DART's logging/assertion infrastructure. Along the way I also added the missing includes for dart/common/Macros.hpp in every file that now references the macro.


Before creating a pull request

  • Run pixi run test-all to lint, build, and test your changes
  • Add unit tests for new functionality
  • Document new methods and classes
  • Add Python bindings (dartpy) if applicable

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 56.93182% with 379 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.48%. Comparing base (bb558d1) to head (f2b5588).
⚠️ Report is 380 commits behind head on main.

Files with missing lines Patch % Lines
dart/dynamics/Skeleton.cpp 42.85% 48 Missing ⚠️
dart/dynamics/Group.cpp 18.75% 26 Missing ⚠️
dart/dynamics/PointMass.cpp 37.50% 25 Missing ⚠️
dart/constraint/WeldJointConstraint.cpp 4.16% 23 Missing ⚠️
dart/dynamics/ReferentialSkeleton.cpp 4.76% 20 Missing ⚠️
dart/constraint/SoftContactConstraint.cpp 0.00% 19 Missing ⚠️
dart/dynamics/SoftBodyNode.cpp 47.05% 18 Missing ⚠️
dart/constraint/BallJointConstraint.cpp 0.00% 15 Missing ⚠️
dart/utils/XmlHelpers.cpp 70.45% 13 Missing ⚠️
dart/utils/SkelParser.cpp 63.33% 11 Missing ⚠️
... and 52 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2109      +/-   ##
==========================================
- Coverage   61.49%   61.48%   -0.01%     
==========================================
  Files         393      393              
  Lines       33144    33155      +11     
  Branches     4084     4084              
==========================================
+ Hits        20382    20386       +4     
- Misses      12762    12769       +7     
Flag Coverage Δ
unittests 61.48% <56.93%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dart/collision/CollisionDetector.cpp 95.00% <100.00%> (ø)
dart/collision/CollisionFilter.cpp 64.81% <100.00%> (ø)
dart/collision/CollisionGroup.cpp 84.64% <100.00%> (ø)
dart/collision/CollisionObject.cpp 73.33% <100.00%> (ø)
dart/collision/bullet/BulletCollisionObject.cpp 88.23% <100.00%> (ø)
...sion/bullet/detail/BulletOverlapFilterCallback.cpp 91.42% <100.00%> (ø)
dart/collision/detail/CollisionGroup.hpp 95.45% <100.00%> (ø)
dart/collision/fcl/FCLCollisionObject.cpp 92.85% <100.00%> (ø)
dart/collision/ode/OdeCollisionDetector.cpp 81.63% <100.00%> (ø)
dart/collision/ode/OdeCollisionGroup.cpp 65.62% <100.00%> (ø)
... and 115 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jslee02 jslee02 marked this pull request as ready for review November 5, 2025 05:50
@jslee02 jslee02 enabled auto-merge (squash) November 5, 2025 05:50
@jslee02 jslee02 merged commit bc2e99b into main Nov 5, 2025
31 of 32 checks passed
@jslee02 jslee02 deleted the feature/dart-assert-macro branch November 5, 2025 07:12
@jslee02 jslee02 added this to the DART 7.0 milestone Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant