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

Return int in pop-count example #949

Merged
merged 2 commits into from
Feb 3, 2024
Merged

Conversation

ryanplusplus
Copy link
Member

@ryanplusplus ryanplusplus commented Jan 29, 2024

I noticed this when doing the exercise. Our example returns an unsigned int, but the tests check for int.

Copy link
Contributor

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!

@ryanplusplus ryanplusplus force-pushed the check-uint-in-pop-count branch from 9ba36fc to 8ca34d5 Compare January 29, 2024 01:12
@ryanplusplus ryanplusplus changed the title Check for uints equal in pop-count Return int in pop-count example Jan 29, 2024
@ryanplusplus ryanplusplus force-pushed the check-uint-in-pop-count branch 2 times, most recently from 978656c to 7e19e91 Compare January 29, 2024 01:13
@ahans
Copy link
Contributor

ahans commented Jan 29, 2024

Is the issue that the test uses TEST_ASSERT_EQUAL_INT instead of TEST_ASSERT_EQUAL_UINT? In that case I think it'd be much better to change the test. Requiring students to implement their function returning int would be quite unexpected, given that in the tests expected is of type unsigned int. Since this exercise was only published yesterday, there are probably not many solutions that would require retesting.

@ryanplusplus
Copy link
Member Author

Is the issue that the test uses TEST_ASSERT_EQUAL_INT instead of TEST_ASSERT_EQUAL_UINT? In that case I think it'd be much better to change the test. Requiring students to implement their function returning int would be quite unexpected, given that in the tests expected is of type unsigned int. Since this exercise was only published yesterday, there are probably not many solutions that would require retesting.

Yep, good point. I'll switch back to my initial approach.

@ryanplusplus ryanplusplus force-pushed the check-uint-in-pop-count branch from 7e19e91 to ef770bd Compare January 31, 2024 01:19
@ryanplusplus ryanplusplus merged commit 962d4e4 into main Feb 3, 2024
4 checks passed
@ryanplusplus ryanplusplus deleted the check-uint-in-pop-count branch February 3, 2024 13:44
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.

3 participants