aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-05-01 17:07:18 -0700
committerAllan Wang <me@allanwang.ca>2019-05-01 17:07:18 -0700
commite0bea89b0897d741634098c33bf2aedc5e5fc88e (patch)
treedc9999e87af09f629ec758bd721cbb01a21dd660 /app/src/test/kotlin
parent3e768c23b3130d8a9f74baaba0f1f247f0036f84 (diff)
parente7a499f6314f8d6345b19c3e221f3cd9cd176d4f (diff)
downloadfrost-e0bea89b0897d741634098c33bf2aedc5e5fc88e.tar.gz
frost-e0bea89b0897d741634098c33bf2aedc5e5fc88e.tar.bz2
frost-e0bea89b0897d741634098c33bf2aedc5e5fc88e.zip
Apply spotless and update changelog
Diffstat (limited to 'app/src/test/kotlin')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt
index e93f507c..5cde7323 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/CoroutineTest.kt
@@ -246,6 +246,8 @@ class CoroutineTest {
}
}
+ class TestException(msg: String) : RuntimeException(msg)
+
@Test
fun exceptionChecks() {
val mainTag = "main-test"
@@ -257,7 +259,7 @@ class CoroutineTest {
val job = SupervisorJob()
val flyweight = Flyweight<Int, Int>(GlobalScope, 200L) {
- throw java.lang.RuntimeException("Flyweight exception")
+ throw TestException("Flyweight exception")
}
suspend fun crash(): Boolean = withContext(Dispatchers.IO) {
@@ -266,7 +268,7 @@ class CoroutineTest {
flyweight.fetch(0).await()
}
true
- } catch (e: java.lang.Exception) {
+ } catch (e: TestException) {
false
}
}
@@ -282,10 +284,6 @@ class CoroutineTest {
println("B")
channel.offer(1)
}
-// launch {
-// delay(2000)
-// job.cancel()
-// }
}
}
}