Skip to content

Add test case for lose?(false , false)#1643

Merged
angelikatyborska merged 2 commits into
exercism:mainfrom
Peacanduck:patch-1
Jul 13, 2026
Merged

Add test case for lose?(false , false)#1643
angelikatyborska merged 2 commits into
exercism:mainfrom
Peacanduck:patch-1

Conversation

@Peacanduck

Copy link
Copy Markdown
Contributor

added missing test case refute Rules.lose?(false, false) to task 3 tests for Concept Pacman Rules

Resolves #1642

added missing test case  refute Rules.lose?(false, false) to task 3 tests for Concept Pacman Rules
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
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!

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for contributing to exercism/elixir 💜 🎉. This is an automated PR comment 🤖 for the maintainers of this repository that helps with the PR review process. You can safely ignore it and wait for a maintainer to review your changes.

Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:

  • General steps

    • 🏆 Does this PR need to receive a label with a reputation modifier (x:size/{tiny,small,medium,large,massive})? (A medium reputation amount is awarded by default, see docs)
  • Any exercise changed

    • 👤 Does the author of the PR need to be added as an author or contributor in <exercise>/.meta/config.json (see docs)?
    • 🔬 Do the analyzer and the analyzer comments exist for this exercise? Do they need to be changed?
    • 📜 Does the design file (<exercise>/.meta/design.md) need to be updated to document new implementation decisions?
  • Concept exercise changed

    • 🌲 Do prerequisites and practices in config.json need to be updated?
    • 📖 Does the concept introduction provide all necessary information to solve this exercise?
  • Concept exercise tests changed

    • ⚪️ Are all tests un-skipped?
    • 🔢 Are all tests annotated with @tag task_id?
    • 🐈 Can all tests be understood by reading the test's block only (e.g. no module attributes, no setup functions)?

Automated comment created by PR Commenter 🤖.

@angelikatyborska

Copy link
Copy Markdown
Member

Hi! The reason we did not add a test for "not touching a ghost without a power pellet active" is that having a power pellet active is irrelevant for the losing condition if pacman is not touching any ghosts. A single test for "don't lose if not touching a ghost" should have been enough in our opinion.

Did you find yourself actually needing this test? Did you manage to write a solution that was incorrect, but passing all the tests?

@Peacanduck

Copy link
Copy Markdown
Contributor Author

yeah this passes all the tests for task 3 but will fail if you try and use the function in task 4 test 11 but everything else will pass

  def lose?(power_pellet_active?, touching_ghost?) do
      not power_pellet_active? and (not touching_ghost? or touching_ghost?) 
  end

@angelikatyborska angelikatyborska left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you

@angelikatyborska angelikatyborska merged commit a3f7c2b into exercism:main Jul 13, 2026
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.

Test Missing

2 participants