aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/kotlin/util')
-rw-r--r--src/test/kotlin/util/ColorCodeTest.kt26
-rw-r--r--src/test/kotlin/util/TextUtilText.kt6
-rw-r--r--src/test/kotlin/util/skyblock/AbilityUtilsTest.kt3
-rw-r--r--src/test/kotlin/util/skyblock/SackUtilTest.kt3
4 files changed, 20 insertions, 18 deletions
diff --git a/src/test/kotlin/util/ColorCodeTest.kt b/src/test/kotlin/util/ColorCodeTest.kt
index d9de36a..949749e 100644
--- a/src/test/kotlin/util/ColorCodeTest.kt
+++ b/src/test/kotlin/util/ColorCodeTest.kt
@@ -1,25 +1,23 @@
package moe.nea.firmament.test.util
+import io.kotest.core.spec.style.AnnotationSpec
import org.junit.jupiter.api.Assertions
-import org.junit.jupiter.api.Test
-import net.minecraft.Bootstrap
-import net.minecraft.SharedConstants
import moe.nea.firmament.util.removeColorCodes
-class ColorCodeTest {
+class ColorCodeTest : AnnotationSpec() {
@Test
fun testWhatever() {
- Assertions.assertEquals("", "".removeColorCodes().toString())
- Assertions.assertEquals("", "§".removeColorCodes().toString())
- Assertions.assertEquals("", "§a".removeColorCodes().toString())
- Assertions.assertEquals("ab", "a§ab".removeColorCodes().toString())
- Assertions.assertEquals("ab", "a§ab§§".removeColorCodes().toString())
- Assertions.assertEquals("abc", "a§ab§§c".removeColorCodes().toString())
- Assertions.assertEquals("bc", "§ab§§c".removeColorCodes().toString())
- Assertions.assertEquals("b§lc", "§ab§l§§c".removeColorCodes(true).toString())
- Assertions.assertEquals("b§lc§l", "§ab§l§§c§l".removeColorCodes(true).toString())
- Assertions.assertEquals("§lb§lc", "§l§ab§l§§c".removeColorCodes(true).toString())
+ Assertions.assertEquals("", "".removeColorCodes())
+ Assertions.assertEquals("", "§".removeColorCodes())
+ Assertions.assertEquals("", "§a".removeColorCodes())
+ Assertions.assertEquals("ab", "a§ab".removeColorCodes())
+ Assertions.assertEquals("ab", "a§ab§§".removeColorCodes())
+ Assertions.assertEquals("abc", "a§ab§§c".removeColorCodes())
+ Assertions.assertEquals("bc", "§ab§§c".removeColorCodes())
+ Assertions.assertEquals("b§lc", "§ab§l§§c".removeColorCodes(true))
+ Assertions.assertEquals("b§lc§l", "§ab§l§§c§l".removeColorCodes(true))
+ Assertions.assertEquals("§lb§lc", "§l§ab§l§§c".removeColorCodes(true))
}
@Test
diff --git a/src/test/kotlin/util/TextUtilText.kt b/src/test/kotlin/util/TextUtilText.kt
index 7091f4e..e676d63 100644
--- a/src/test/kotlin/util/TextUtilText.kt
+++ b/src/test/kotlin/util/TextUtilText.kt
@@ -1,15 +1,17 @@
package moe.nea.firmament.test.util
+import io.kotest.core.spec.style.AnnotationSpec
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import moe.nea.firmament.test.testutil.ItemResources
import moe.nea.firmament.util.getLegacyFormatString
-class TextUtilText {
+class TextUtilText : AnnotationSpec() {
@Test
fun testThing() {
// TODO: add more tests that are directly validated with 1.8.9 code
val text = ItemResources.loadText("all-chat")
- Assertions.assertEquals("§r§r§8[§r§9302§r§8] §r§6♫ §r§b[MVP§r§d+§r§b] lrg89§r§f: test§r", text.getLegacyFormatString())
+ Assertions.assertEquals("§r§r§8[§r§9302§r§8] §r§6♫ §r§b[MVP§r§d+§r§b] lrg89§r§f: test§r",
+ text.getLegacyFormatString())
}
}
diff --git a/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt b/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt
index abe739d..dbce762 100644
--- a/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt
+++ b/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt
@@ -1,5 +1,6 @@
package moe.nea.firmament.test.util.skyblock
+import io.kotest.core.spec.style.AnnotationSpec
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import kotlin.time.Duration.Companion.minutes
@@ -9,7 +10,7 @@ import moe.nea.firmament.test.testutil.ItemResources
import moe.nea.firmament.util.skyblock.AbilityUtils
import moe.nea.firmament.util.unformattedString
-class AbilityUtilsTest {
+class AbilityUtilsTest : AnnotationSpec() {
fun List<AbilityUtils.ItemAbility>.stripDescriptions() = map {
it.copy(descriptionLines = it.descriptionLines.map { Text.literal(it.unformattedString) })
diff --git a/src/test/kotlin/util/skyblock/SackUtilTest.kt b/src/test/kotlin/util/skyblock/SackUtilTest.kt
index e0e3e63..e1b106e 100644
--- a/src/test/kotlin/util/skyblock/SackUtilTest.kt
+++ b/src/test/kotlin/util/skyblock/SackUtilTest.kt
@@ -1,12 +1,13 @@
package moe.nea.firmament.test.util.skyblock
+import io.kotest.core.spec.style.AnnotationSpec
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import moe.nea.firmament.test.testutil.ItemResources
import moe.nea.firmament.util.skyblock.SackUtil
import moe.nea.firmament.util.skyblock.SkyBlockItems
-class SackUtilTest {
+class SackUtilTest : AnnotationSpec() {
@Test
fun testOneRottenFlesh() {
Assertions.assertEquals(