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

Swap actual and expected values in tests #66

Merged
merged 1 commit into from
May 18, 2024
Merged

Conversation

pfertyk
Copy link
Contributor

@pfertyk pfertyk commented May 17, 2024

This is a follow-up for exercism/gdscript-test-runner#18.

@glaxxie @BNAndras as main contributors, could you please take a look? ;)

Copy link

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

[no important files changed]
@pfertyk pfertyk force-pushed the swap-actual-and-expected branch from a7b182f to a18f75c Compare May 17, 2024 19:14
Copy link
Member

@BNAndras BNAndras May 17, 2024

Choose a reason for hiding this comment

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

Unrelated to this PR, but roughly_equal doesn't seem ergonomic here. The student is expecting two floats to be compared, but the test runner sees these as booleans. So if you fail test_age_on_Earth and the test runner says something like false isn't true, that might be confusing compared to returning "31.68 is not 31.69". That intuitively makes more sense to me so perhaps roughly_equal can log the two values being compared when the comparison is false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, thanks! I will create a new GitHub issue for this. Perhaps Godot has some rounding methods that we could use here ;)

@pfertyk pfertyk merged commit 95bac6e into main May 18, 2024
2 checks passed
@pfertyk pfertyk deleted the swap-actual-and-expected branch May 18, 2024 21:45
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