Skip to content

🐛 Fix bug in fetch_and mutation test - #137

Merged
elbeno merged 1 commit into
intel:mainfrom
elbeno:fix-mutate-fetch-and-test
Jul 14, 2026
Merged

🐛 Fix bug in fetch_and mutation test#137
elbeno merged 1 commit into
intel:mainfrom
elbeno:fix-mutate-fetch-and-test

Conversation

@elbeno

@elbeno elbeno commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Problem:

  • The test for fetch_and can complete with one of the test values being zero in the case where the operations happened one way around. This is not a problem, but the same outcome can be produced by a mutation test replacing += with -=.

Solution:

  • Alter the test values so that zero is not a possible outcome. Changing += to -= will produce a mutation that does not survive.

Problem:
- The test for `fetch_and` can complete with one of the test values being zero
  in the case where the operations happened one way around. This is not a
  problem, but the same outcome can be produced by a mutation test replacing
  `+=` with `-=`.

Solution:
- Alter the test values so that zero is not a possible outcome. Changing `+=` to
  `-=` will produce a mutation that does not survive.
@elbeno
elbeno enabled auto-merge July 14, 2026 13:14
@elbeno
elbeno merged commit 08f2e60 into intel:main Jul 14, 2026
27 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.

2 participants