Skip to content

chore: Clean up testing framework#2542

Open
trisyoungs wants to merge 23 commits into
develop2from
dissolve2/clean-up-testing-framework
Open

chore: Clean up testing framework#2542
trisyoungs wants to merge 23 commits into
develop2from
dissolve2/clean-up-testing-framework

Conversation

@trisyoungs

@trisyoungs trisyoungs commented Jun 26, 2026

Copy link
Copy Markdown
Member

This is a big clean-up PR of the test classes we had, hopefully making things a little clearer and setting up for follow-on work with Node test fixtures.

@trisyoungs trisyoungs force-pushed the dissolve2/remove-coredata branch from 4fc7e40 to 2aca81c Compare June 29, 2026 10:54
@trisyoungs trisyoungs changed the title Dissolve2/clean up testing framework chore: Clean up testing framework Jun 30, 2026
@trisyoungs trisyoungs force-pushed the dissolve2/remove-coredata branch from aa4b541 to 6d88fb4 Compare June 30, 2026 08:08
Base automatically changed from dissolve2/remove-coredata to develop2 June 30, 2026 10:34
@trisyoungs trisyoungs force-pushed the dissolve2/clean-up-testing-framework branch from 254f7d5 to 903ba78 Compare June 30, 2026 11:04
@trisyoungs trisyoungs marked this pull request as ready for review June 30, 2026 11:07
@trisyoungs trisyoungs requested a review from rprospero June 30, 2026 11:07

@rprospero rprospero 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.

I've left a couple of comments about predicate assertsions that might give us cleaner results from our tests.

Comment thread tests/testing.cpp
Comment thread tests/testing.cpp Outdated
Comment on lines +79 to +84
void testVec3(const Vector3 &A, const Vector3 &B, double tolerance)
{
EXPECT_NEAR(A.x, B.x, tolerance);
EXPECT_NEAR(A.y, B.y, tolerance);
EXPECT_NEAR(A.z, B.z, tolerance);
}

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.

One pain point that I inflicted on myself while doing the parsers work is putting EXPECT statements in a wrapper function. The problem is that, when the test fails, it will just tell you that a line in the wrapper function failed without telling you which line in your actual test called that wrapper function. Returning a predicate assertion, like I explained above, ensure that the test runner reports back the actual place that the line failed.

@trisyoungs trisyoungs force-pushed the dissolve2/clean-up-testing-framework branch from 9cef717 to c8ba80d Compare July 2, 2026 20:01
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