Closes#35 (R26 — filed PLAUSIBLE on types read, measured here).
valready=awaitState(viewModel.state,"Ready with a probe"){itisConversionState.Ready&&it.input.probe!=null}assertNull("nothing here should reach a terminal failure",(readyas?ConversionState.Failed))
The predicate requires Ready. Ready and Failed are sibling subtypes of one sealed interface, so ready as? Failed is always null and the assertNull could never fire.
Measured, not reasoned
Flipping the line to assertNotNullfailed 3 of the 4 tests in the class — three, because pickedProbe() has three callers. That's also why it was worth removing rather than shrugging at: it read as coverage inside a helper the whole class depends on.
Deleted rather than replaced
There's nothing for a live assertion to add. A pick that ended in Failed never satisfies the predicate, so awaitState fails on its timeout naming what it was waiting for — "Ready with a probe" — which is a better failure message than the assertion would have produced. The comment now says so, so the next reader doesn't re-add the guard the predicate already is.
Note
The suite is green before and after, which is the point: deleting a dead assertion cannot change a result, and if it had, the line wasn't dead.
This is the ninth vacuous assertion this line of work has surfaced, and they're consistent in shape — they hide in helpers, they pass, and they look like care.
Closes #35 (R26 — filed `PLAUSIBLE` on types read, **measured here**).
```kotlin
val ready = awaitState(viewModel.state, "Ready with a probe") {
it is ConversionState.Ready && it.input.probe != null
}
assertNull("nothing here should reach a terminal failure", (ready as? ConversionState.Failed))
```
The predicate requires `Ready`. `Ready` and `Failed` are sibling subtypes of one sealed interface, so `ready as? Failed` is **always null** and the `assertNull` could never fire.
## Measured, not reasoned
Flipping the line to `assertNotNull` **failed 3 of the 4 tests** in the class — three, because `pickedProbe()` has three callers. That's also why it was worth removing rather than shrugging at: it read as coverage inside a helper the whole class depends on.
## Deleted rather than replaced
There's nothing for a live assertion to add. A pick that ended in `Failed` never satisfies the predicate, so `awaitState` fails on its timeout **naming what it was waiting for** — *"Ready with a probe"* — which is a better failure message than the assertion would have produced. The comment now says so, so the next reader doesn't re-add the guard the predicate already is.
## Note
The suite is green before and after, which is the point: **deleting a dead assertion cannot change a result, and if it had, the line wasn't dead.**
This is the ninth vacuous assertion this line of work has surfaced, and they're consistent in shape — they hide in helpers, they pass, and they look like care.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #35 (R26 — filed
PLAUSIBLEon types read, measured here).The predicate requires
Ready.ReadyandFailedare sibling subtypes of one sealed interface, soready as? Failedis always null and theassertNullcould never fire.Measured, not reasoned
Flipping the line to
assertNotNullfailed 3 of the 4 tests in the class — three, becausepickedProbe()has three callers. That's also why it was worth removing rather than shrugging at: it read as coverage inside a helper the whole class depends on.Deleted rather than replaced
There's nothing for a live assertion to add. A pick that ended in
Failednever satisfies the predicate, soawaitStatefails on its timeout naming what it was waiting for — "Ready with a probe" — which is a better failure message than the assertion would have produced. The comment now says so, so the next reader doesn't re-add the guard the predicate already is.Note
The suite is green before and after, which is the point: deleting a dead assertion cannot change a result, and if it had, the line wasn't dead.
This is the ninth vacuous assertion this line of work has surfaced, and they're consistent in shape — they hide in helpers, they pass, and they look like care.