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

Hit requirement untested #901

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Hit requirement untested #901

merged 2 commits into from
Sep 12, 2024

Conversation

nash8114
Copy link
Contributor

There is a requirement for exercise ellens-alien-game's hit() method which states: "Make sure that the health points do not drop below zero." Adding a "get_health() == 0" at the end of the hit test now tests whether this is the case.

There is a requirement for hit() method which states: "Make sure that the health points do not drop below zero." Adding a "get_health() == 0" at the end of the hit test now tests whether this is the case.
Copy link
Contributor

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@siebenschlaefer
Copy link
Contributor

I like this additional test, I've seen a few solutions that did let the health become negative.
@vaeng, what do you think?

Copy link
Contributor

@vaeng vaeng left a comment

Choose a reason for hiding this comment

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

Yes, that is a good addition.

I don't see what the code formatting check is complaining about though.

@nash8114
Copy link
Contributor Author

nash8114 commented Sep 11, 2024 via email

@ahans
Copy link
Contributor

ahans commented Sep 12, 2024

Yes, that is a good addition.

I don't see what the code formatting check is complaining about though.

The issue is that the line is too long. I ran clang-format and pushed the fix. I also ran the test runner locally to make sure it parses this properly. Things seem fine. I think the only case where it has issues is when a single string is split over multiple lines. Different arguments of TEST_CASE can be on different lines with no issue.

@ahans ahans merged commit c372ebe into exercism:main Sep 12, 2024
8 checks passed
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.

4 participants