Skip to content

Commit

Permalink
Add an assertion to IterableSubjectTest#iterableContainsAtLeastInOrde…
Browse files Browse the repository at this point in the history
…rWithOneShotIterableWrongOrder.

We don't handle printing one shot iterables when the assertion fails,
but previously the test omitted printing the contents of "but was,"
so it seemed like the test was passing by accident.
Adding an explicit assert here to make it clear that the test is passing as intended and a TODO for improving the behavior.

RELNOTES=n/a
PiperOrigin-RevId: 447704700
  • Loading branch information
chaoren authored and Google Java Core Libraries committed May 10, 2022
1 parent 9da7dd1 commit cf6da94
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ public String toString() {
"expected order for required elements",
"but was");
assertFailureValue("expected order for required elements", "[1, 3, null]");
assertFailureValue("but was", "BadIterable"); // TODO(b/231966021): Output its elements.
}

@Test
Expand Down

0 comments on commit cf6da94

Please sign in to comment.