-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test coverage using API from Java, entry in README, more correct over…
…flow handling
- Loading branch information
1 parent
855ff24
commit b9813cb
Showing
4 changed files
with
95 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/java/scala/compat/java8/DurationConvertersJavaTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (C) 2012-2018 Lightbend Inc. <http://www.lightbend.com> | ||
*/ | ||
package scala.compat.java8; | ||
|
||
import org.junit.Test; | ||
import scala.concurrent.duration.FiniteDuration; | ||
import scala.runtime.java8.*; | ||
|
||
import java.time.Duration; | ||
import java.time.temporal.ChronoUnit; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
public class DurationConvertersJavaTest { | ||
|
||
@Test | ||
public void apiAccessibleFromJava() { | ||
DurationConverters.toScala(Duration.of(5, ChronoUnit.SECONDS)); | ||
DurationConverters.toJava(FiniteDuration.create(5, TimeUnit.SECONDS)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters