Initialize classes before tests

This commit is contained in:
Him188 2021-05-31 13:38:21 +08:00
parent bdd390e774
commit db98862712

View File

@ -9,6 +9,7 @@
package net.mamoe.mirai.internal.test
import net.mamoe.mirai.IMirai
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.Timeout
import java.util.concurrent.TimeUnit
@ -28,6 +29,13 @@ abstract class AbstractTest {
System.setProperty("mirai.debug.network.show.components.creation.stacktrace", "true")
}
companion object {
init {
Exception() // create a exception to load relevant classes to estimate invocation time of test cases more accurately.
IMirai::class.simpleName // similarly, load classes.
}
}
}
internal expect class PlatformInitializationTest() : AbstractTest {