Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] Replace Math::is_equal_approx with == and doctest::Approx #68275

Merged
merged 1 commit into from
Nov 6, 2022

Conversation

Geometror
Copy link
Member

@Geometror Geometror commented Nov 5, 2022

Replaces all occurrences of Math::is_equal_approx in in our test suites (only within the CHECK macro) with == and doctest::Approx, so that the actual values are printed if a test fails. This makes debugging much easier as it is no longer needed to add a print statement to find out the actual value a function returned, resulting in much more fluent TDD.

@Geometror Geometror added this to the 4.x milestone Nov 5, 2022
@Geometror Geometror requested a review from a team as a code owner November 5, 2022 01:29
Copy link
Member

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

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

Sure, either way works, and this has the advantage of printing the values as mentioned in the OP.

@akien-mga akien-mga modified the milestones: 4.x, 4.0 Nov 6, 2022
@akien-mga akien-mga merged commit 44a0b86 into godotengine:master Nov 6, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants