diff --git a/projects/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/PerfsTest.kt b/projects/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/PerfsTest.kt index 28da1bcdc..311f49de7 100644 --- a/projects/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/PerfsTest.kt +++ b/projects/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/PerfsTest.kt @@ -1,12 +1,18 @@ package org.koin.test import kotlinx.coroutines.runBlocking -import org.koin.core.* import org.koin.core.context.GlobalContext.startKoin import org.koin.core.context.GlobalContext.stopKoin import org.koin.core.context.waitKoinStart -import org.koin.core.logger.* +import org.koin.core.isAllStartedJobsDone +import org.koin.core.lazyModules +import org.koin.core.logger.EmptyLogger +import org.koin.core.logger.Level +import org.koin.core.logger.Logger +import org.koin.core.onKoinStarted +import org.koin.core.runOnKoinStarted import org.koin.core.time.Timer +import org.koin.core.waitAllStartJobs import org.koin.dsl.koinApplication import org.koin.mp.KoinPlatform import kotlin.test.Test @@ -15,12 +21,16 @@ class PerfsTest { @Test fun perfModule400_module_perfs() { - (1..3).forEach { runPerfs() } + for (index in 1..3) { + runPerfs() + } } @Test fun perfModule400_lazy_module_perfs() { - (1..3).forEach { runPerfs(isLazy = true) } + for (index in 1..3) { + runPerfs(isLazy = true) + } } private fun runPerfs(log: Logger = EmptyLogger(), isLazy: Boolean = false) { diff --git a/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt b/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt index fcede0946..9ec968759 100644 --- a/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt +++ b/projects/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt @@ -25,7 +25,7 @@ class ParameterStackTest { ) }.koin - (1..10).forEach { + for (index in 1..10) { koin.get { parametersOf(KoinPlatformTools.generateId()) } } diff --git a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt index 3ccb14a5e..56bceff2d 100644 --- a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt +++ b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt @@ -15,7 +15,7 @@ class DebugLogTest { printLogger(Level.INFO) }.koin - (1..10).forEach { + for (index in 1..10) { measureDuration("with if") { if (koin.logger.isAt(Level.DEBUG)) { koin.logger.debug(message { "test me" }) diff --git a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/CreateAPITest.kt b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/CreateAPITest.kt index 50d33b8f4..46b14c534 100644 --- a/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/CreateAPITest.kt +++ b/projects/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/CreateAPITest.kt @@ -1,6 +1,8 @@ //package org.koin.core.instance // -//import org.junit.Assert.* +//import org.junit.Assert.assertEquals +//import org.junit.Assert.assertNotEquals +//import org.junit.Assert.fail //import org.junit.Test //import org.koin.core.error.InstanceCreationException //import org.koin.core.logger.Level @@ -123,7 +125,7 @@ // ) // }.koin // -// (1..3).forEach { +// for (index in 1..3) { // koin.get() // } // }