diff --git a/frameworks/innerkitsimpl/test/unittest/plugin_test/ext_decoder_test.cpp b/frameworks/innerkitsimpl/test/unittest/plugin_test/ext_decoder_test.cpp index 6e4c1f975d8a0c902df20e6fd2e39921a623d223..80f9b6493c38f0b4086cf8fb686c35c5fc895c8b 100644 --- a/frameworks/innerkitsimpl/test/unittest/plugin_test/ext_decoder_test.cpp +++ b/frameworks/innerkitsimpl/test/unittest/plugin_test/ext_decoder_test.cpp @@ -1397,10 +1397,13 @@ HWTEST_F(ExtDecoderTest, WriteJpegCodedDataTest004, TestSize.Level3) opts.formatHint = "image/jpeg"; std::unique_ptr imageSource = ImageSource::CreateImageSource(IMAGE_INPUT_JPEG_PATH, opts, errorCode); + ASSERT_NE(imageSource, nullptr); DecodeOptions decodeOpts; decodeOpts.allocatorType = AllocatorType::DMA_ALLOC; std::unique_ptr tmpPixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); + ASSERT_NE(tmpPixelMap, nullptr); std::shared_ptr pixelMap = std::move(tmpPixelMap); + ASSERT_NE(pixelMap, nullptr); ASSERT_EQ(pixelMap->GetAllocatorType(), AllocatorType::DMA_ALLOC); ASSERT_NE(pixelMap->GetFd(), nullptr); AuxiliaryPictureType type = AuxiliaryPictureType::GAINMAP; @@ -1429,10 +1432,13 @@ HWTEST_F(ExtDecoderTest, WriteJpegUncodedDataTest004, TestSize.Level3) opts.formatHint = "image/jpeg"; std::unique_ptr imageSource = ImageSource::CreateImageSource(IMAGE_INPUT_JPEG_PATH, opts, errorCode); + ASSERT_NE(imageSource, nullptr); DecodeOptions decodeOpts; decodeOpts.allocatorType = AllocatorType::DMA_ALLOC; std::unique_ptr tmpPixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); + ASSERT_NE(tmpPixelMap, nullptr); std::shared_ptr pixelMap = std::move(tmpPixelMap); + ASSERT_NE(pixelMap, nullptr); ASSERT_EQ(pixelMap->GetAllocatorType(), AllocatorType::DMA_ALLOC); ASSERT_NE(pixelMap->GetFd(), nullptr); AuxiliaryPictureType type = AuxiliaryPictureType::GAINMAP; @@ -1462,10 +1468,13 @@ HWTEST_F(ExtDecoderTest, WriteJpegUncodedDataTest005, TestSize.Level3) opts.formatHint = "image/jpeg"; std::unique_ptr imageSource = ImageSource::CreateImageSource(IMAGE_INPUT_JPEG_PATH, opts, errorCode); + ASSERT_NE(imageSource, nullptr); DecodeOptions decodeOpts; decodeOpts.allocatorType = AllocatorType::DMA_ALLOC; std::unique_ptr tmpPixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); + ASSERT_NE(tmpPixelMap, nullptr); std::shared_ptr pixelMap = std::move(tmpPixelMap); + ASSERT_NE(pixelMap, nullptr); ASSERT_EQ(pixelMap->GetAllocatorType(), AllocatorType::DMA_ALLOC); ASSERT_NE(pixelMap->GetFd(), nullptr); AuxiliaryPictureType type = AuxiliaryPictureType::DEPTH_MAP; @@ -1495,10 +1504,13 @@ HWTEST_F(ExtDecoderTest, WriteJpegUncodedDataTest006, TestSize.Level3) opts.formatHint = "image/jpeg"; std::unique_ptr imageSource = ImageSource::CreateImageSource(IMAGE_INPUT_JPEG_PATH, opts, errorCode); + ASSERT_NE(imageSource, nullptr); DecodeOptions decodeOpts; decodeOpts.allocatorType = AllocatorType::DMA_ALLOC; std::unique_ptr tmpPixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode); + ASSERT_NE(tmpPixelMap, nullptr); std::shared_ptr pixelMap = std::move(tmpPixelMap); + ASSERT_NE(pixelMap, nullptr); ASSERT_EQ(pixelMap->GetAllocatorType(), AllocatorType::DMA_ALLOC); ASSERT_NE(pixelMap->GetFd(), nullptr); AuxiliaryPictureType type = AuxiliaryPictureType::LINEAR_MAP; diff --git a/test/resource/image/ohos_test.xml b/test/resource/image/ohos_test.xml index fda3fb0eb04bc8a26b81b572a26dd0e1f7763650..f325e6d63aeb47d854f50a039e9cbd83683b394e 100644 --- a/test/resource/image/ohos_test.xml +++ b/test/resource/image/ohos_test.xml @@ -116,11 +116,11 @@ -