package com.ponzischeme89.memby.ui.player

import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test

class PictureSizingTest {

    @Test
    fun `auto fills classic four by three video`() {
        assertTrue(shouldZoomVideo("auto", 640, 480, 1f))
    }

    @Test
    fun `auto accounts for anamorphic pixel aspect ratio`() {
        assertTrue(shouldZoomVideo("auto", 720, 480, 8f / 9f))
    }

    @Test
    fun `auto preserves modern widescreen video`() {
        assertFalse(shouldZoomVideo("auto", 1920, 1080, 1f))
        assertFalse(shouldZoomVideo("auto", 1920, 800, 1f))
    }

    @Test
    fun `manual modes are deterministic`() {
        assertFalse(shouldZoomVideo("original", 640, 480, 1f))
        assertTrue(shouldZoomVideo("fill", 1920, 1080, 1f))
    }
}
