mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 14:20:24 +08:00
Initialize classes before tests
This commit is contained in:
parent
bdd390e774
commit
db98862712
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
package net.mamoe.mirai.internal.test
|
package net.mamoe.mirai.internal.test
|
||||||
|
|
||||||
|
import net.mamoe.mirai.IMirai
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.junit.jupiter.api.Timeout
|
import org.junit.jupiter.api.Timeout
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
@ -28,6 +29,13 @@ abstract class AbstractTest {
|
|||||||
System.setProperty("mirai.debug.network.show.components.creation.stacktrace", "true")
|
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 {
|
internal expect class PlatformInitializationTest() : AbstractTest {
|
||||||
|
Loading…
Reference in New Issue
Block a user