Fix Kotlin tests

This commit is contained in:
Wieland Schöbl
2021-04-11 23:09:28 +02:00
parent 763c6ca04f
commit 7be51851e9

View File

@@ -6,12 +6,14 @@ import org.junit.jupiter.api.Test
// The primary function of the Kotlin tests is to ensure Kotlin-specific features are preserved // The primary function of the Kotlin tests is to ensure Kotlin-specific features are preserved
// Meaning some tests might only make sure features work at compile time. // Meaning some tests might only make sure features work at compile time.
class KotlinTests {
@Test @Test
fun `Module should support index access operator`() { fun `Module should support index access operator`() {
HMCore.modules["ores"]!!["other"] HMCore.modules["ores"]?.apply { this["other"] }
} }
@Test @Test
fun `Module should support 'in' keyword`() { fun `Module should support 'in' keyword`() {
HMCore.modules["ores"]?.let { "copper" in it } HMCore.modules["ores"]?.let { "copper" in it }
} }
}