Skip to content

Convert CHECK_STORAGE_AGAINST_STANDARD to a macro - #4456

Merged
adamkewley merged 1 commit into
mainfrom
test_helpers_updates_part2
Sep 23, 2026
Merged

adamkewley merged 1 commit into
mainfrom
test_helpers_updates_part2

Conversation

@nickbianco

@nickbianco nickbianco commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Part 2 of 4 changes related to #3555 and #4393.

These changes were originally written all together on a different branch that was supposed to only add Testing.cpp and some minor changes, but eventually ballooned as I started to pull on threads. Therefore, I used Claude to split the changes on the branch onto four different branches and created a stack of PRs , a new feature offered by the GitHub CLI (e.g., gh stack) that I wanted to try out.

Brief summary of changes

Converts CHECK_STORAGE_AGAINST_STANDARD to a macro backed by the new OpenSim::Testing::storageMatchesStandard(). The error message argument has been removed since the majority of usages were not very informative and/or are redundant with the test context that Catch2 provides.

Testing I've completed

Ran tests locally; CI.

Looking for feedback on...

CHANGELOG.md (choose one)

  • no need to update because...updating internal test layout.

Stack created with GitHub Stacks CLI • Give Feedback 💬


This change is Reviewable

@nickbianco
nickbianco added this pull request to stack #4459 September 18, 2026 21:08
@nickbianco
nickbianco force-pushed the test_helpers_updates_part2 branch 2 times, most recently from 980921f to 69b5104 Compare September 21, 2026 14:30
@nickbianco
nickbianco force-pushed the test_helpers_updates_part2 branch 2 times, most recently from 34661d1 to 66243b7 Compare September 21, 2026 14:51
@nickbianco
nickbianco force-pushed the test_helpers_updates_part2 branch 4 times, most recently from 43b2b09 to ff1d755 Compare September 21, 2026 16:01
@nickbianco nickbianco changed the title Rename CHECK_STORAGE_AGAINST_STANDARD to OpenSim::Testing::checkStorageAgainstStandard Convert CHECK_STORAGE_AGAINST_STANDARD to a macro Sep 21, 2026
@nickbianco nickbianco changed the title Convert CHECK_STORAGE_AGAINST_STANDARD to a macro Convert CHECK_STORAGE_AGAINST_STANDARD to a macro Sep 21, 2026
@nickbianco
nickbianco force-pushed the test_helpers_updates_part2 branch from ff1d755 to 4f36e51 Compare September 21, 2026 16:07
@nickbianco
nickbianco marked this pull request as ready for review September 21, 2026 16:07
@nickbianco
nickbianco force-pushed the test_helpers_updates_part2 branch 2 times, most recently from ba7bc2a to 1e521f6 Compare September 21, 2026 18:45
Base automatically changed from test_helpers_updates_part1 to main September 23, 2026 05:30
…redicate

Reimplement the storage comparison as OpenSim::Testing::storageMatchesStandard(),
a bool-returning predicate defined in Testing.cpp, and keep
CHECK_STORAGE_AGAINST_STANDARD as a thin variadic macro that wraps it in
OPENSIM_ASSERT_ALWAYS. Expanding the assertion at the call site makes a
failure report the test's file and line rather than a location inside
Testing.cpp, which matters because the helper has ~60 call sites.

The per-column RMS errors and tolerances are still written to stdout, and the
offending column is now named explicitly on failure.

Call sites drop the file/line/message arguments; the macro spelling is
unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@adamkewley
adamkewley force-pushed the test_helpers_updates_part2 branch from 1e521f6 to 3b1e4d0 Compare September 23, 2026 05:30

@adamkewley adamkewley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@adamkewley reviewed 31 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on nickbianco).

@adamkewley
adamkewley merged commit eacc8c8 into main Sep 23, 2026
6 checks passed
@nickbianco
nickbianco deleted the test_helpers_updates_part2 branch September 23, 2026 15:18
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.

2 participants