Skip to content

Commit 33c56fb

Browse files
committed
Add chinese support. Unit test. Release 1.9.
1 parent 9505d28 commit 33c56fb

4 files changed

Lines changed: 18 additions & 19 deletions

File tree

app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ android {
2020
applicationId = "io.bloco.snowflake"
2121
minSdk = 26
2222
targetSdk = 37
23-
versionCode = 45 // Increment by 5 to account for ABI split
24-
versionName = "1.8"
23+
versionCode = 50 // Increment by 5 to account for ABI split
24+
versionName = "1.9"
2525

2626
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
27-
androidResources.localeFilters += listOf("de", "en", "fr", "ja", "pt", "tr")
27+
androidResources.localeFilters += listOf("de", "en", "fr", "ja", "pt", "tr", "zh-rCN")
2828
}
2929

3030
buildTypes {

app/src/main/java/io/bloco/snowflake/common/UnitHelpers.kt renamed to app/src/main/java/io/bloco/snowflake/common/ConvertToBytes.kt

File renamed without changes.

app/src/test/java/io/bloco/snowflake/ExampleUnitTest.kt

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package io.bloco.snowflake.common
2+
3+
import org.junit.Assert.assertEquals
4+
import org.junit.Test
5+
6+
class ConvertToBytesTest {
7+
@Test
8+
fun test() {
9+
assertEquals(0, convertToBytes(bytes = 0, unit = null))
10+
assertEquals(1, convertToBytes(bytes = 1, unit = "B"))
11+
assertEquals(1024, convertToBytes(bytes = 1, unit = "KB"))
12+
assertEquals(1024 * 1024, convertToBytes(bytes = 1, unit = "MB"))
13+
assertEquals(100 * 1024 * 1024, convertToBytes(bytes = 100, unit = "MB"))
14+
}
15+
}

0 commit comments

Comments
 (0)