Skip to content

Add tests for PrimitiveFloatArraySubject empty/null and out-of-range exact-equality cases#1670

Open
vasiliy-mikhailov wants to merge 1 commit into
google:masterfrom
vasiliy-mikhailov:add-PrimitiveFloatArraySubject-tests
Open

Add tests for PrimitiveFloatArraySubject empty/null and out-of-range exact-equality cases#1670
vasiliy-mikhailov wants to merge 1 commit into
google:masterfrom
vasiliy-mikhailov:add-PrimitiveFloatArraySubject-tests

Conversation

@vasiliy-mikhailov

Copy link
Copy Markdown

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.

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.

1 participant