Skip to content

Commit

Permalink
Under j2cl, make CollectorTester work. Previously, it was present b…
Browse files Browse the repository at this point in the history
…ut failed at runtime.

RELNOTES=`collect`: Under j2cl, made `CollectorTester` work. Previously, it was present but failed at runtime.
PiperOrigin-RevId: 534163401
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed May 22, 2023
1 parent 852a7d3 commit b62c88e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Objects;
import java.util.function.BiPredicate;
Expand Down Expand Up @@ -159,7 +158,7 @@ public final CollectorTester<T, A, R> expectCollects(R expectedResult, T... inpu
}

private void doExpectCollects(R expectedResult, List<T> inputs) {
for (CollectStrategy scheme : EnumSet.allOf(CollectStrategy.class)) {
for (CollectStrategy scheme : CollectStrategy.values()) {
A finalAccum = scheme.result(collector, inputs);
if (collector.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) {
assertEquivalent(expectedResult, (R) finalAccum);
Expand Down

0 comments on commit b62c88e

Please sign in to comment.