Skip to content

Commit

Permalink
Add static import test
Browse files Browse the repository at this point in the history
  • Loading branch information
Badbond committed Feb 18, 2022
1 parent 4420491 commit 0b62344
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package tech.picnic.errorprone.bugpatterns;

import static java.time.temporal.ChronoUnit.DAYS;

import com.google.common.collect.ImmutableSet;
import java.time.Clock;
import java.time.Duration;
Expand Down Expand Up @@ -152,6 +154,10 @@ Duration testDurationOfDays() {
return Duration.of(1, ChronoUnit.DAYS);
}

Duration testDurationOfDaysStaticImport() {
return Duration.of(1, DAYS);
}

Duration testDurationBetweenInstants() {
return Duration.ofMillis(Instant.MAX.toEpochMilli() - Instant.MIN.toEpochMilli());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ Duration testDurationOfDays() {
return Duration.ofDays(1);
}

Duration testDurationOfDaysStaticImport() {
return Duration.ofDays(1);
}

Duration testDurationBetweenInstants() {
return Duration.between(Instant.MIN, Instant.MAX);
}
Expand Down

0 comments on commit 0b62344

Please sign in to comment.