Some checks are pending
continuous-integration/drone/push Build is running
Reformat code. closes #24
22 lines
657 B
Kotlin
22 lines
657 B
Kotlin
package me.zobrist.tichucounter
|
|
|
|
import me.zobrist.tichucounter.domain.digitCount
|
|
import org.junit.Assert.assertEquals
|
|
import org.junit.Test
|
|
|
|
/**
|
|
* Example local unit test, which will execute on the development machine (host).
|
|
*
|
|
* See [testing documentation](http://d.android.com/tools/testing).
|
|
*/
|
|
class StringExtensionTest {
|
|
@Test
|
|
fun calculation_isCorrect() {
|
|
assertEquals(0, "-".digitCount())
|
|
assertEquals(0, "".digitCount())
|
|
assertEquals(2, "-10".digitCount())
|
|
assertEquals(2, "10".digitCount())
|
|
assertEquals(10, "1234567890".digitCount())
|
|
assertEquals(10, "-1234567890".digitCount())
|
|
}
|
|
} |