convert EmojiPreference and EmojiCompatFont to Kotlin (#1922)
* convert EmojiPreference and EmojiCompatFont to Kotlin * move preference related to to dedicated preference package * update proguard-rules.pro * reformat & add comment * maintain disposable information in EmojiPreference instead of EmojiCompatFont
This commit is contained in:
parent
fc7b02d987
commit
1d309850b0
21 changed files with 709 additions and 906 deletions
|
@ -0,0 +1,47 @@
|
|||
package com.keylesspalace.tusky.util
|
||||
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
|
||||
class EmojiCompatFontTest {
|
||||
|
||||
@Test
|
||||
fun testCompareVersions() {
|
||||
|
||||
assertEquals(
|
||||
-1,
|
||||
EmojiCompatFont.compareVersions(
|
||||
listOf(0),
|
||||
listOf(1, 2, 3)
|
||||
)
|
||||
)
|
||||
assertEquals(
|
||||
1,
|
||||
EmojiCompatFont.compareVersions(
|
||||
listOf(1, 2, 3),
|
||||
listOf(0, 0, 0)
|
||||
)
|
||||
)
|
||||
assertEquals(
|
||||
-1,
|
||||
EmojiCompatFont.compareVersions(
|
||||
listOf(1, 0, 1),
|
||||
listOf(1, 1, 0)
|
||||
)
|
||||
)
|
||||
assertEquals(
|
||||
0,
|
||||
EmojiCompatFont.compareVersions(
|
||||
listOf(4, 5, 6),
|
||||
listOf(4, 5, 6)
|
||||
)
|
||||
)
|
||||
assertEquals(
|
||||
0,
|
||||
EmojiCompatFont.compareVersions(
|
||||
listOf(0, 0),
|
||||
listOf(0)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue