Skip to content

chore: adding more tests to pass cargo mutants - #60

Merged
LPGhatguy merged 1 commit into
LPGhatguy:mainfrom
sanbox-irl:chore/mutant-tests
Sep 15, 2026
Merged

LPGhatguy merged 1 commit into
LPGhatguy:mainfrom
sanbox-irl:chore/mutant-tests

Conversation

@sanbox-irl

Copy link
Copy Markdown
Contributor

We now pass the following command:

cargo mutants --exclude-re="impl fmt::Debug" --exclude-re="replace \\| with \\^ in Index::to_bits"

There are two mutants which we ignore:

  • all debug implementations, which are generally considered perma-unstable in Rust. we can add debug testing for them if you'd like to consider those stable.
  • replacing Index::to_bits's | operator with ^ -- this substitution is simply correct and ideally is actually done by the compiler itself (and in fact, is), so it's not a problem or a bug.

It is possible to add cargo mutants as a dependency and add ignoring these in code, but I don't think that's ever worth it to add clutter.

Generally, we were hitting 210 out of 220 mutants immediately. I simply added a few more small tests, all of which we passed immediately, so this is just for correctness -- I discovered no new bugs.

Comment thread src/arena.rs
}

#[test]
fn aba_test() {

@LPGhatguy LPGhatguy Sep 15, 2026 •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I legitimately internalized this as the ABBA problem and so every time you said "ABA" IRL I was like "isn't it ABBA?"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the ABBA problem is when you have too many men after midnight

@LPGhatguy LPGhatguy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Clean!

@LPGhatguy
LPGhatguy merged commit 331fe18 into LPGhatguy:main Sep 15, 2026
2 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