Add Kotlin Unit tests

This commit is contained in:
Wieland Schöbl
2021-04-11 22:58:02 +02:00
parent abb8f1b600
commit 30bb92cc93

View File

@@ -0,0 +1,17 @@
package org.hmcore.tests
import org.hmcore.HMCore
import org.junit.jupiter.api.Test
// 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.
@Test
fun `Module should support index access operator`() {
HMCore.modules["ores"]!!["other"]
}
@Test
fun `Module should support 'in' keyword`() {
HMCore.modules["ores"]?.let { "copper" in it }
}