* commit '8a658946e9eced055d85f31b27921664c5db914f': Camera2 Tests: fix some sanity checks
This commit is contained in:
commit
2fe84fcb01
2 changed files with 6 additions and 10 deletions
|
@ -134,10 +134,6 @@ TEST_F(CameraMetadataTest, types) {
|
|||
TEST_F(CameraMetadataTest, RequiredFormats) {
|
||||
TEST_EXTENSION_FORKING_INIT;
|
||||
|
||||
EXPECT_TRUE(
|
||||
HasElementInArrayFromStaticTag(ANDROID_SCALER_AVAILABLE_FORMATS,
|
||||
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED));
|
||||
|
||||
EXPECT_TRUE(
|
||||
HasElementInArrayFromStaticTag(ANDROID_SCALER_AVAILABLE_FORMATS,
|
||||
HAL_PIXEL_FORMAT_BLOB)); // JPEG
|
||||
|
@ -169,9 +165,11 @@ TEST_F(CameraMetadataTest, SaneResolutions) {
|
|||
// Iff there are listed raw resolutions, the format should be available
|
||||
int rawResolutionsCount =
|
||||
GetEntryCountFromStaticTag(ANDROID_SCALER_AVAILABLE_RAW_SIZES);
|
||||
EXPECT_EQ(rawResolutionsCount > 0,
|
||||
HasElementInArrayFromStaticTag(ANDROID_SCALER_AVAILABLE_FORMATS,
|
||||
HAL_PIXEL_FORMAT_RAW_SENSOR));
|
||||
if (rawResolutionsCount > 0) {
|
||||
EXPECT_TRUE(
|
||||
HasElementInArrayFromStaticTag(ANDROID_SCALER_AVAILABLE_FORMATS,
|
||||
HAL_PIXEL_FORMAT_RAW_SENSOR));
|
||||
}
|
||||
|
||||
// Required processed sizes.
|
||||
int processedSizeCount =
|
||||
|
|
|
@ -80,9 +80,7 @@ TEST_F(CameraModuleTest, LoadModuleBadIndices) {
|
|||
int idx[] = { -1, mNumberOfCameras, mNumberOfCameras + 1 };
|
||||
|
||||
for (unsigned i = 0; i < sizeof(idx)/sizeof(idx[0]); ++i) {
|
||||
// Since the initialization should fail at device open(), it doesn't
|
||||
// matter which version of CameraNDevice is used here
|
||||
mDevice = new Camera2Device(idx[i]);
|
||||
CreateCamera(idx[i], &mDevice);
|
||||
status_t deviceInitializeCode = initializeDevice(idx[i]);
|
||||
EXPECT_NE(OK, deviceInitializeCode);
|
||||
EXPECT_EQ(-ENODEV, deviceInitializeCode)
|
||||
|
|
Loading…
Reference in a new issue