whiskers.git / android / app / src / test / kotlin / app / whiskers / RotationTest.kt
RotationTest.kt15 lines · 597 B · raw
1package app.whiskers
2
3import android.media.ExifInterface
4import org.junit.Assert.assertEquals
5import org.junit.Test
6
7class RotationTest {
8    @Test fun exifOrientationBecomesClockwiseDegrees() {
9        assertEquals(0, rotationDegrees(ExifInterface.ORIENTATION_NORMAL))
10        assertEquals(90, rotationDegrees(ExifInterface.ORIENTATION_ROTATE_90))
11        assertEquals(180, rotationDegrees(ExifInterface.ORIENTATION_ROTATE_180))
12        assertEquals(270, rotationDegrees(ExifInterface.ORIENTATION_ROTATE_270))
13        assertEquals(0, rotationDegrees(ExifInterface.ORIENTATION_UNDEFINED))
14    }
15}