Add tests for PrimitiveFloatArraySubject empty/null and out-of-range exact-equality cases - #1674
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_943287418
branch
5 times, most recently
from
July 6, 2026 17:40
5aae01a to
700455c
Compare
…exact-equality cases Adds 8 tests for `PrimitiveFloatArraySubject` covering isEmpty/isNotEmpty success and failure paths, null-array failures for `usingExactEquality` and `usingTolerance`, and the IllegalArgumentException messages produced when an out-of-range negative int or long is passed to `usingExactEquality().contains()`. Tests use Truth's own assertThat/expectFailure idiom and assert on concrete failure facts. | metric | before | after | |---|---|---| | mutation score | 79% | 97% | | test methods added | n/a | 8 | The additions are append-only (no existing test is modified) and pass against the current code. --- **How this was produced** This PR was generated with an AI-assisted pipeline built around mutation testing (PIT). The pipeline mutates the target class (flipping conditions and changing boundary/edge cases) and runs the existing tests against each mutant. Where a mutant survives (the existing tests do not catch that edge case), it writes a focused test for that case and reruns PIT to confirm the new test actually kills that specific mutant. So every added test is verified to catch a concrete edge case the suite missed before, rather than being speculative or redundant. The change is additive only (no production code modified), and the module builds green under its CI JDK. Fixes #1670 COPYBARA_INTEGRATE_REVIEW=#1670 from vasiliy-mikhailov:add-PrimitiveFloatArraySubject-tests a747fc6 PiperOrigin-RevId: 943375672
copybara-service
Bot
force-pushed
the
test_943287418
branch
from
July 6, 2026 17:44
700455c to
14f5cfd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add tests for PrimitiveFloatArraySubject empty/null and out-of-range exact-equality cases
Adds 8 tests for
PrimitiveFloatArraySubjectcovering isEmpty/isNotEmpty success and failure paths, null-array failures forusingExactEqualityandusingTolerance, and the IllegalArgumentException messages produced when an out-of-range negative int or long is passed tousingExactEquality().contains(). Tests use Truth's own assertThat/expectFailure idiom and assert on concrete failure facts.The additions are append-only (no existing test is modified) and pass against the current code.
How this was produced
This PR was generated with an AI-assisted pipeline built around mutation testing (PIT). The pipeline mutates the target class (flipping conditions and changing boundary/edge cases) and runs the existing tests against each mutant. Where a mutant survives (the existing tests do not catch that edge case), it writes a focused test for that case and reruns PIT to confirm the new test actually kills that specific mutant. So every added test is verified to catch a concrete edge case the suite missed before, rather than being speculative or redundant. The change is additive only (no production code modified), and the module builds green under its CI JDK.
Fixes #1670
FUTURE_COPYBARA_INTEGRATE_REVIEW=#1670 from vasiliy-mikhailov:add-PrimitiveFloatArraySubject-tests a747fc6