aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/scala/async/run/exceptions/ExceptionsSpec.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2018-05-09 13:08:39 +1000
committerGitHub <noreply@github.com>2018-05-09 13:08:39 +1000
commite04aa84ed4b9b9340d104d386e449da702b99e16 (patch)
treeb0987e20a4d3a5d85ff94a1bb552b4e062f471d7 /src/test/scala/scala/async/run/exceptions/ExceptionsSpec.scala
parent9de808535a546c49a04bd50c93212425f3344ba9 (diff)
parent3f035632e37da0c484fcf43310857263e3470433 (diff)
downloadscala-async-e04aa84ed4b9b9340d104d386e449da702b99e16.tar.gz
scala-async-e04aa84ed4b9b9340d104d386e449da702b99e16.tar.bz2
scala-async-e04aa84ed4b9b9340d104d386e449da702b99e16.zip
Merge pull request #199 from xuwei-k/procedure-syntax
fix procedure syntax
Diffstat (limited to 'src/test/scala/scala/async/run/exceptions/ExceptionsSpec.scala')
-rw-r--r--src/test/scala/scala/async/run/exceptions/ExceptionsSpec.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/scala/scala/async/run/exceptions/ExceptionsSpec.scala b/src/test/scala/scala/async/run/exceptions/ExceptionsSpec.scala
index 649543f..9ee21ae 100644
--- a/src/test/scala/scala/async/run/exceptions/ExceptionsSpec.scala
+++ b/src/test/scala/scala/async/run/exceptions/ExceptionsSpec.scala
@@ -18,13 +18,13 @@ import org.junit.Test
class ExceptionsSpec {
@Test
- def `uncaught exception within async`() {
+ def `uncaught exception within async`(): Unit = {
val fut = async { throw new Exception("problem") }
intercept[Exception] { Await.result(fut, 2.seconds) }
}
@Test
- def `uncaught exception within async after await`() {
+ def `uncaught exception within async after await`(): Unit = {
val base = Future { "five!".length }
val fut = async {
val len = await(base)
@@ -34,7 +34,7 @@ class ExceptionsSpec {
}
@Test
- def `await failing future within async`() {
+ def `await failing future within async`(): Unit = {
val base = Future[Int] { throw new Exception("problem") }
val fut = async {
val x = await(base)
@@ -44,7 +44,7 @@ class ExceptionsSpec {
}
@Test
- def `await failing future within async after await`() {
+ def `await failing future within async after await`(): Unit = {
val base = Future[Any] { "five!".length }
val fut = async {
val a = await(base.mapTo[Int]) // result: 5