mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-02 12:50:16 +08:00
[core/test] Fix AbstractTest.checkTestFactories
This commit is contained in:
parent
112d4e7927
commit
7dee5fe6c8
@ -31,7 +31,8 @@ internal actual abstract class AbstractTest actual constructor() : CommonAbstrac
|
|||||||
actual companion object {
|
actual companion object {
|
||||||
@OptIn(ExperimentalStdlibApi::class)
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
private fun checkTestFactories(testInfo: TestInfo) {
|
@JvmStatic
|
||||||
|
fun checkTestFactories(testInfo: TestInfo) {
|
||||||
val clazz = testInfo.testClass.getOrNull()?.kotlin ?: return
|
val clazz = testInfo.testClass.getOrNull()?.kotlin ?: return
|
||||||
for (function in clazz.functions) {
|
for (function in clazz.functions) {
|
||||||
if (function.hasAnnotation<TestFactory>()) {
|
if (function.hasAnnotation<TestFactory>()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user