commonTest.io.islandtime.internal.ExtensionsTest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core-metadata Show documentation
Show all versions of core-metadata Show documentation
A multiplatform library for working with dates and times
The newest version!
package io.islandtime.internal
import kotlin.test.Test
import kotlin.test.assertEquals
class ExtensionsTest {
@Test
fun `StringBuilder_appendZeroPadded pads Int as expected`() {
assertEquals("9", StringBuilder().appendZeroPadded(9, 1).toString())
assertEquals("0", StringBuilder().appendZeroPadded(0, 1).toString())
assertEquals("09", StringBuilder().appendZeroPadded(9, 2).toString())
assertEquals("10", StringBuilder().appendZeroPadded(10, 2).toString())
assertEquals("0009", StringBuilder().appendZeroPadded(9, 4).toString())
assertEquals("0060", StringBuilder().appendZeroPadded(60, 4).toString())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy