[core/test] Fix AbstractTest.checkTestFactories

This commit is contained in:
Him188 2022-07-31 19:39:58 +08:00
parent 112d4e7927
commit 7dee5fe6c8
No known key found for this signature in database
GPG Key ID: BA439CDDCF652375

View File

@ -31,7 +31,8 @@ internal actual abstract class AbstractTest actual constructor() : CommonAbstrac
actual companion object {
@OptIn(ExperimentalStdlibApi::class)
@BeforeAll
private fun checkTestFactories(testInfo: TestInfo) {
@JvmStatic
fun checkTestFactories(testInfo: TestInfo) {
val clazz = testInfo.testClass.getOrNull()?.kotlin ?: return
for (function in clazz.functions) {
if (function.hasAnnotation<TestFactory>()) {