diff --git a/src/test/kotlin/net/shadowfacts/shadowui/util/ColorTest.kt b/src/test/kotlin/net/shadowfacts/shadowui/util/ColorTest.kt new file mode 100644 index 0000000..c26c43c --- /dev/null +++ b/src/test/kotlin/net/shadowfacts/shadowui/util/ColorTest.kt @@ -0,0 +1,25 @@ +package net.shadowfacts.shadowui.util + +import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Test + +/** + * @author shadowfacts + */ +class ColorTest { + + @Test + fun fromRGB() { + val color = Color(0x123456) + assertEquals(0x12, color.red) + assertEquals(0x34, color.green) + assertEquals(0x56, color.blue) + } + + @Test + fun toARGB() { + val color = Color(red = 0x12, green = 0x34, blue = 0x56, alpha = 0x78) + assertEquals(0x78123456, color.argb) + } + +} \ No newline at end of file