Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
werli committed Jan 4, 2024
1 parent 8b32040 commit 63c398c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ ImmutableSet<Optional<String>> testOptionalOrOtherOptional() {

ImmutableSet<Optional<String>> testOptionalIdentity() {
return ImmutableSet.of(
Optional.of("foo").stream().findFirst(),
Optional.of("bar").stream().findAny(),
Optional.of("baz").stream().min(String::compareTo),
Optional.of("qux").stream().max(String::compareTo));
Optional.of("foo").or(() -> Optional.empty()),
Optional.of("bar").or(Optional::empty),
Optional.of("baz").stream().findFirst(),
Optional.of("qux").stream().findAny(),
Optional.of("corge").stream().min(String::compareTo),
Optional.of("grault").stream().max(String::compareTo));
}

ImmutableSet<Optional<String>> testOptionalFilter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ ImmutableSet<Optional<String>> testOptionalOrOtherOptional() {

ImmutableSet<Optional<String>> testOptionalIdentity() {
return ImmutableSet.of(
Optional.of("foo"), Optional.of("bar"), Optional.of("baz"), Optional.of("qux"));
Optional.of("foo"),
Optional.of("bar"),
Optional.of("baz"),
Optional.of("qux"),
Optional.of("corge"),
Optional.of("grault"));
}

ImmutableSet<Optional<String>> testOptionalFilter() {
Expand Down

0 comments on commit 63c398c

Please sign in to comment.