Skip to content

Commit

Permalink
Add all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed May 8, 2024
1 parent 36a6842 commit 739cb75
Showing 1 changed file with 90 additions and 1 deletion.
91 changes: 90 additions & 1 deletion src/test/kotlin/com/infomaniak/lib/core/FormatterFileSizeTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ class FormatterFileSizeTest {
@Test
fun testAllFormatterFileSizePossibilities() {

val bytesList = listOf(123L, 912L, 1_892L)
val bytesList = listOf(
123L,
912L,
1_892L,
1_892_000L,
1_892_000_000L,
1_892_000_000_000L,
1_892_000_000_000_000L,
1_892_000_000_000_000_000L,
)
val iecUnitsLists = listOf(true, false)
val shortValueList = listOf(true, false)
val valueOnlyList = listOf(true, false)
Expand Down Expand Up @@ -89,6 +98,86 @@ class FormatterFileSizeTest {
"1.89",
"1.89 kB",
"1.89 Ko",
"1.8",
"1.8",
"1.8 MB",
"1.8 Mo",
"1.85",
"1.85",
"1.85 MB",
"1.85 Mo",
"1.9",
"1.9",
"1.9 MB",
"1.9 Mo",
"1.89",
"1.89",
"1.89 MB",
"1.89 Mo",
"1.8",
"1.8",
"1.8 GB",
"1.8 Go",
"1.85",
"1.85",
"1.85 GB",
"1.85 Go",
"1.9",
"1.9",
"1.9 GB",
"1.9 Go",
"1.89",
"1.89",
"1.89 GB",
"1.89 Go",
"1.8",
"1.8",
"1.8 TB",
"1.8 To",
"1.85",
"1.85",
"1.85 TB",
"1.85 To",
"1.9",
"1.9",
"1.9 TB",
"1.9 To",
"1.89",
"1.89",
"1.89 TB",
"1.89 To",
"1.8",
"1.8",
"1.8 PB",
"1.8 Po",
"1.85",
"1.85",
"1.85 PB",
"1.85 Po",
"1.9",
"1.9",
"1.9 PB",
"1.9 Po",
"1.89",
"1.89",
"1.89 PB",
"1.89 Po",
"1.8",
"1.8",
"1.8 EB",
"1.8 Eo",
"1.85",
"1.85",
"1.85 EB",
"1.85 Eo",
"1.9",
"1.9",
"1.9 EB",
"1.9 Eo",
"1.89",
"1.89",
"1.89 EB",
"1.89 Eo",
)

bytesList.forEach { bytes ->
Expand Down

0 comments on commit 739cb75

Please sign in to comment.