fix of tests

This commit is contained in:
InsanusMokrassar 2024-01-04 20:30:09 +06:00
parent 303e1e6281
commit 9a0b67f938
2 changed files with 5 additions and 34 deletions

View File

@ -5,36 +5,3 @@ plugins {
}
apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath"
kotlin {
sourceSets {
jvmMain {
dependencies {
api project(":micro_utils.coroutines")
}
}
androidMain {
dependencies {
api project(":micro_utils.coroutines")
api libs.android.fragment
}
dependsOn jvmMain
}
linuxX64Main {
dependencies {
api libs.okio
}
}
mingwX64Main {
dependencies {
api libs.okio
}
}
linuxArm64Main {
dependencies {
api libs.okio
}
}
}
}

View File

@ -19,6 +19,7 @@ class HexColorTests {
val g: Int,
val b: Int,
val a: Int,
vararg val additionalRGBAVariants: String
)
val testColors: List<TestColor>
get() = listOf(
@ -34,6 +35,7 @@ class HexColorTests {
g = 0x00,
b = 0x00,
a = 0xff,
"rgba(255,0,0,1)",
),
TestColor(
color = HEXAColor(uint = 0x00ff00ffu),
@ -47,6 +49,7 @@ class HexColorTests {
g = 0xff,
b = 0x00,
a = 0xff,
"rgba(0,255,0,1)"
),
TestColor(
color = HEXAColor(0x0000ffffu),
@ -60,6 +63,7 @@ class HexColorTests {
g = 0x00,
b = 0xff,
a = 0xff,
"rgba(0,0,255,1)"
),
TestColor(
color = HEXAColor(0xff000088u),
@ -149,7 +153,7 @@ class HexColorTests {
assertEquals(it.shortHex, it.color.shortHex)
assertEquals(it.shortHexa, it.color.shortHexa)
assertEquals(it.rgb, it.color.rgb)
assertEquals(it.rgba, it.color.rgba)
assertTrue(it.rgba == it.color.rgba || it.color.rgba in it.additionalRGBAVariants)
assertEquals(it.r, it.color.r)
assertEquals(it.g, it.color.g)
assertEquals(it.b, it.color.b)