aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/src/com/android/tv/util/ScaledBitmapInfoTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/src/com/android/tv/util/ScaledBitmapInfoTest.java')
-rw-r--r--tests/unit/src/com/android/tv/util/ScaledBitmapInfoTest.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/unit/src/com/android/tv/util/ScaledBitmapInfoTest.java b/tests/unit/src/com/android/tv/util/ScaledBitmapInfoTest.java
index 36d25a10..2714e2e9 100644
--- a/tests/unit/src/com/android/tv/util/ScaledBitmapInfoTest.java
+++ b/tests/unit/src/com/android/tv/util/ScaledBitmapInfoTest.java
@@ -1,24 +1,29 @@
package com.android.tv.util;
+import static org.junit.Assert.assertEquals;
+
import android.graphics.Bitmap;
import android.support.test.filters.SmallTest;
-import android.test.AndroidTestCase;
import com.android.tv.util.BitmapUtils.ScaledBitmapInfo;
+import org.junit.Test;
+
/**
* Tests for {@link ScaledBitmapInfo}.
*/
@SmallTest
-public class ScaledBitmapInfoTest extends AndroidTestCase {
+public class ScaledBitmapInfoTest {
private static final Bitmap B80x100 = Bitmap.createBitmap(80, 100, Bitmap.Config.RGB_565);
private static final Bitmap B960x1440 = Bitmap.createBitmap(960, 1440, Bitmap.Config.RGB_565);
+ @Test
public void testSize_B100x100to50x50() {
ScaledBitmapInfo actual = BitmapUtils.createScaledBitmapInfo("B80x100", B80x100, 50, 50);
assertScaledBitmapSize(2, 40, 50, actual);
}
+ @Test
public void testNeedsToReload_B100x100to50x50() {
ScaledBitmapInfo actual = BitmapUtils.createScaledBitmapInfo("B80x100", B80x100, 50, 50);
assertNeedsToReload(false, actual, 25, 25);
@@ -31,6 +36,7 @@ public class ScaledBitmapInfoTest extends AndroidTestCase {
/**
* Reproduces <a href="http://b/20488453">b/20488453</a>.
*/
+ @Test
public void testBug20488453() {
ScaledBitmapInfo actual = BitmapUtils
.createScaledBitmapInfo("B960x1440", B960x1440, 284, 160);