diff options
-rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java | 11 |
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)); } /** |