Move episode numbers to the guide panel, test the now line (0.26.0)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,9 +28,18 @@ class GuideGridTest {
|
||||
assertEquals(1, cells.size); assertEquals(1f, cells[0].widthFraction, .001f)
|
||||
}
|
||||
@Test fun episodeTitlesSplitIntoSeriesAndNumberAndFilmsStayWhole() {
|
||||
assertEquals("Dragon Ball Z" to "S1 E4", guideTitleParts("Dragon Ball Z / S1 E4 / Piccolo's Plan"))
|
||||
assertEquals("Dragon Ball Z" to "S1 E4 • Piccolo's Plan", guideTitleParts("Dragon Ball Z / S1 E4 / Piccolo's Plan"))
|
||||
assertEquals("The 'Burbs" to null, guideTitleParts("The 'Burbs"))
|
||||
}
|
||||
@Test fun theNowLineFollowsTheClockAndLeavesWhenTheWindowScrollsPastIt() {
|
||||
assertEquals(0f, guideNowFraction(start, start, end)!!, .001f)
|
||||
assertEquals(.25f, guideNowFraction(start + GUIDE_SLOT_MS, start, end)!!, .001f)
|
||||
assertNull(guideNowFraction(end, start, end))
|
||||
val scrolled = guideWindowStart(start + minute, 4)
|
||||
assertNull(guideNowFraction(start + minute, scrolled, scrolled + GUIDE_SLOTS * GUIDE_SLOT_MS))
|
||||
val back = guideWindowStart(start + minute, 0)
|
||||
assertEquals(minute.toFloat() / (GUIDE_SLOTS * GUIDE_SLOT_MS), guideNowFraction(start + minute, back, back + GUIDE_SLOTS * GUIDE_SLOT_MS)!!, .001f)
|
||||
}
|
||||
@Test fun theWindowStartsOnTheHalfHourAndMovesBySlots() {
|
||||
assertEquals(0L, start % GUIDE_SLOT_MS)
|
||||
assertEquals(start + 2 * GUIDE_SLOT_MS, guideWindowStart(start + minute, 2))
|
||||
|
||||
Reference in New Issue
Block a user