Skip to content

Commit a95655f

Browse files
committed
Remove KotlinTypeToken failure tests
1 parent 1348a53 commit a95655f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

BotCommands-core/src/test/kotlin/io/github/freya022/botcommands/core/reflect/KotlinTypeTokenTest.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package io.github.freya022.botcommands.core.reflect
33
import io.github.freya022.botcommands.api.core.reflect.KotlinTypeToken
44
import org.junit.jupiter.api.Test
55
import org.junit.jupiter.api.assertDoesNotThrow
6-
import org.junit.jupiter.api.assertThrows
76

87
object KotlinTypeTokenTest {
98
@Test
@@ -12,20 +11,4 @@ object KotlinTypeTokenTest {
1211
assertDoesNotThrow { object : KotlinTypeToken<List<String>>() {} }
1312
assertDoesNotThrow { object : KotlinTypeToken<List<*>>() {} }
1413
}
15-
16-
@Test
17-
fun `Invalid KotlinTypeToken`() {
18-
assertThrows<IllegalArgumentException> { genericFunction<String>() }
19-
assertThrows<IllegalArgumentException> { reifiedGenericFunction<String>() }
20-
}
21-
22-
private fun <T> genericFunction() {
23-
object : KotlinTypeToken<T>() {}
24-
}
25-
26-
// KType#classifier returns null, but KType#javaType works,
27-
// while it should be supported, the APIs use KType, and you can't get one from a Type.
28-
private inline fun <reified T> reifiedGenericFunction(): KotlinTypeToken<T> {
29-
return object : KotlinTypeToken<T>() {}
30-
}
3114
}

0 commit comments

Comments
 (0)