summaryrefslogtreecommitdiffstats
path: root/graphics/tests
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2011-02-16 15:46:12 -0800
committerJesse Wilson <jessewilson@google.com>2011-02-16 17:50:43 -0800
commitf7f9d9c39df22ad6929f001f07588469f77e8bf5 (patch)
treef5b12af320df4d2b6d3c037fe1c2c40056fc200f /graphics/tests
parent260a13a95edbe41fb8042b96b8c35a8a65546ec0 (diff)
downloadframeworks_base-f7f9d9c39df22ad6929f001f07588469f77e8bf5.zip
frameworks_base-f7f9d9c39df22ad6929f001f07588469f77e8bf5.tar.gz
frameworks_base-f7f9d9c39df22ad6929f001f07588469f77e8bf5.tar.bz2
Expose an API to get a bitmap's size in bytes.
Change-Id: I960c3b02b1ba8d3a8d92aaa98955a159e6f3a228 http://b/3184897
Diffstat (limited to 'graphics/tests')
-rw-r--r--graphics/tests/graphicstests/src/android/graphics/BitmapTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/graphics/tests/graphicstests/src/android/graphics/BitmapTest.java b/graphics/tests/graphicstests/src/android/graphics/BitmapTest.java
index 6734bb7..685a998 100644
--- a/graphics/tests/graphicstests/src/android/graphics/BitmapTest.java
+++ b/graphics/tests/graphicstests/src/android/graphics/BitmapTest.java
@@ -16,8 +16,6 @@
package android.graphics;
-import android.graphics.Bitmap;
-import android.graphics.Color;
import android.test.suitebuilder.annotation.SmallTest;
import junit.framework.TestCase;
@@ -42,6 +40,10 @@ public class BitmapTest extends TestCase {
assertEquals("rowbytes", 200, bm2.getRowBytes());
assertEquals("rowbytes", 200, bm3.getRowBytes());
+ assertEquals("byteCount", 80000, bm1.getByteCount());
+ assertEquals("byteCount", 40000, bm2.getByteCount());
+ assertEquals("byteCount", 40000, bm3.getByteCount());
+
assertEquals("height", 200, bm1.getHeight());
assertEquals("height", 200, bm2.getHeight());
assertEquals("height", 200, bm3.getHeight());