Add Cp1252Charset contains test

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent eef8fc1f0c
commit cec68723a4
  1. 13
      util/src/test/java/dev/openrs2/util/charset/Cp1252CharsetTest.kt

@ -3,6 +3,8 @@ package dev.openrs2.util.charset
import org.junit.jupiter.api.Assertions.assertArrayEquals
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue
object Cp1252CharsetTest {
@Test
@ -98,4 +100,15 @@ object Cp1252CharsetTest {
)
)
}
@Test
fun testContains() {
assertTrue(Cp1252Charset.contains(Cp1252Charset))
assertTrue(Cp1252Charset.contains(Charsets.US_ASCII))
assertFalse(Cp1252Charset.contains(Charsets.ISO_8859_1))
assertFalse(Cp1252Charset.contains(Charsets.UTF_8))
assertFalse(Cp1252Charset.contains(Charsets.UTF_16))
assertFalse(Cp1252Charset.contains(Charsets.UTF_16BE))
assertFalse(Cp1252Charset.contains(Charsets.UTF_16LE))
}
}

Loading…
Cancel
Save