summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorYin-Chia Yeh <yinchiayeh@google.com>2014-05-29 18:42:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-29 18:42:15 +0000
commit789de110c7e906b6066151bb89853f05e1c44aca (patch)
treec81e8d847eb2d01c80ab39f718d5175854b924b7 /media
parentc7b1b7aeec62677bad38d571e561653763392bf0 (diff)
parent82984727642c5705cfb5d7868bc92997bd2bfd4d (diff)
downloadframeworks_base-789de110c7e906b6066151bb89853f05e1c44aca.zip
frameworks_base-789de110c7e906b6066151bb89853f05e1c44aca.tar.gz
frameworks_base-789de110c7e906b6066151bb89853f05e1c44aca.tar.bz2
Merge "Camera2: Test null TonemapCurve behavior" into lmp-preview-dev
Diffstat (limited to 'media')
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
index fe51215..afc2931 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
@@ -1032,11 +1032,14 @@ public class CameraMetadataTest extends junit.framework.TestCase {
float[] redOut = mMetadata.get(CaptureResult.TONEMAP_CURVE_RED);
float[] greenOut = mMetadata.get(CaptureResult.TONEMAP_CURVE_GREEN);
float[] blueOut = mMetadata.get(CaptureResult.TONEMAP_CURVE_BLUE);
- assertTrue("Input and output tonemap curve should match", Arrays.equals(red, redOut));
- assertTrue("Input and output tonemap curve should match", Arrays.equals(green, greenOut));
- assertTrue("Input and output tonemap curve should match", Arrays.equals(blue, blueOut));
+ assertArrayEquals(red, redOut);
+ assertArrayEquals(green, greenOut);
+ assertArrayEquals(blue, blueOut);
TonemapCurve tcOut = mMetadata.get(CaptureResult.TONEMAP_CURVE);
- assertTrue("Input and output tonemap curve should match", tcIn.equals(tcOut));
+ assertEquals(tcIn, tcOut);
+ mMetadata.set(CaptureResult.TONEMAP_CURVE_GREEN, null);
+ // If any of channel has null curve, return a null TonemapCurve
+ assertNull(mMetadata.get(CaptureResult.TONEMAP_CURVE));
}
/**