Skip to content

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

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_943287418
Jul 6, 2026
Merged

Add tests for PrimitiveFloatArraySubject empty/null and out-of-range exact-equality cases#1674
copybara-service[bot] merged 1 commit into
masterfrom
test_943287418

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Add tests for PrimitiveFloatArraySubject empty/null and out-of-range 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

FUTURE_COPYBARA_INTEGRATE_REVIEW=#1670 from vasiliy-mikhailov:add-PrimitiveFloatArraySubject-tests a747fc6

@copybara-service
copybara-service Bot force-pushed the test_943287418 branch 5 times, most recently from 5aae01a to 700455c Compare July 6, 2026 17:40
…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
copybara-service Bot merged commit 14f5cfd into master Jul 6, 2026
@copybara-service
copybara-service Bot deleted the test_943287418 branch July 6, 2026 17:44
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