summaryrefslogtreecommitdiff
path: root/opendc-common/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-common/src/test')
-rw-r--r--opendc-common/src/test/kotlin/org/opendc/common/DispatcherCoroutineDispatcherTest.kt10
1 files changed, 10 insertions, 0 deletions
diff --git a/opendc-common/src/test/kotlin/org/opendc/common/DispatcherCoroutineDispatcherTest.kt b/opendc-common/src/test/kotlin/org/opendc/common/DispatcherCoroutineDispatcherTest.kt
index af8a7857..01b3d2fc 100644
--- a/opendc-common/src/test/kotlin/org/opendc/common/DispatcherCoroutineDispatcherTest.kt
+++ b/opendc-common/src/test/kotlin/org/opendc/common/DispatcherCoroutineDispatcherTest.kt
@@ -36,6 +36,10 @@ import org.opendc.simulator.kotlin.runSimulation
* Test suite for [DispatcherCoroutineDispatcher].
*/
class DispatcherCoroutineDispatcherTest {
+
+ /**
+ * Tests if a dispatcher yields the correct time
+ */
@Test
fun testYield() = runSimulation {
withContext(dispatcher.asCoroutineDispatcher()) {
@@ -45,6 +49,9 @@ class DispatcherCoroutineDispatcherTest {
}
}
+ /**
+ * Tests if a dispatcher correctly delays
+ */
@Test
fun testDelay() = runSimulation {
withContext(dispatcher.asCoroutineDispatcher()) {
@@ -54,6 +61,9 @@ class DispatcherCoroutineDispatcherTest {
}
}
+ /**
+ * Tests if a dispatcher correctly times out
+ */
@Test
fun testTimeout() = runSimulation {
withContext(dispatcher.asCoroutineDispatcher()) {