Auto commit Tue Mar 24 06:01:01 PM CDT 2026
This commit is contained in:
@@ -17,6 +17,13 @@ class SetupScreenUiLogicTest {
|
||||
assertTrue(setupScreenUsesScrollableContainer())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun program_selection_numbers_use_at_most_two_decimals() {
|
||||
assertEquals("12", formatMaxTwoDecimals(12f))
|
||||
assertEquals("4.5", formatMaxTwoDecimals(4.5f))
|
||||
assertEquals("4.57", formatMaxTwoDecimals(4.567f))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun setup_screen_unsaved_changes_true_when_timeline_dirty() {
|
||||
assertTrue(
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mindmachine.mvp.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class DurationFormatTest {
|
||||
@Test
|
||||
fun `duration up to 60 minutes is shown in whole minutes only`() {
|
||||
assertEquals("1 min", formatDuration(60))
|
||||
assertEquals("45 min", formatDuration(45 * 60 + 59))
|
||||
assertEquals("60 min", formatDuration(60 * 60))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `duration over 60 minutes is shown in hours with at most two decimals`() {
|
||||
assertEquals("1.02 h", formatDuration(61 * 60))
|
||||
assertEquals("1.5 h", formatDuration(90 * 60))
|
||||
assertEquals("2 h", formatDuration(120 * 60))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user