Cotton code
24 lines · 866 B · KotlinRaw
package com.cottondb.albumsimport org.junit.Assert.assertEqualsimport org.junit.Test/** * On its side a grid keeps each cell the size it has upright (the hard walk, 27 Nov 2026: a Set's 25 shots were five * huge cells across a sliver under its two buttons; the Bin's photos were not to be seen at all). */class GridSizeTest {    @Test    fun a_cell_on_its_side_is_the_cell_upright() {        // A 411 dp wide phone, five across: 73 dp cells; on its side (914 dp) that makes eleven across, three rows for 25.        assertEquals(73, GridSize.cell(411, 5))        assertEquals(11, (914 - 2 * GridSize.SIDE_DP) / GridSize.cell(411, 5))        assertEquals(91, GridSize.cell(411, 4))    }    @Test    fun a_cell_is_never_smaller_than_a_finger() {        assertEquals(56, GridSize.cell(320, 8))        assertEquals(56, GridSize.cell(100, 0))    }}