diff --git a/frameworks/innerkitsimpl/test/BUILD.gn b/frameworks/innerkitsimpl/test/BUILD.gn index 341e014c7618a9cf062058ecf0e3c3214f443138..352c58db8c193f9db97b16b4b88f17bc16f67e6d 100644 --- a/frameworks/innerkitsimpl/test/BUILD.gn +++ b/frameworks/innerkitsimpl/test/BUILD.gn @@ -16,9 +16,10 @@ import("//build/config/components/memory_utils/purgeable_mem_config.gni") import("//foundation/multimedia/image_framework/ide/image_decode_config.gni") module_output_path = "image_framework/image_framework" +pixelmap_module_output_path = "graphic_2d/pixelmap" ohos_unittest("pixelmaptest") { - module_out_path = module_output_path + module_out_path = pixelmap_module_output_path cflags = [ "-DIMAGE_DEBUG_FLAG", diff --git a/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_gl_test.cpp b/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_gl_test.cpp index c1557fdfcb68f66ed92880254228dd1d6b3afe30..f017e2e1631ae6297fb4d81ba828edd10d354556 100644 --- a/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_gl_test.cpp +++ b/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_gl_test.cpp @@ -320,8 +320,8 @@ HWTEST_F(PixelMapTest, PixelMapDmaTestRotate001, TestSize.Level3) // ARGB_8888 to others options.srcPixelFormat = PixelFormat::ARGB_8888; for (iter = SupportDmaMemPixelFormat.begin(); iter != SupportDmaMemPixelFormat.end() ; ++iter) { - uint32_t colorLength = NUM_512 * NUM_647 * NUM_4; // w:2 * h:3 * pixelByte:4 - uint8_t buffer[NUM_512 * NUM_647 * NUM_4] = { 0 }; // w:2 * h:3 * pixelByte:4 + uint32_t colorLength = NUM_512 * NUM_512 * NUM_4; // w:2 * h:3 * pixelByte:4 + uint8_t buffer[NUM_512 * NUM_512 * NUM_4] = { 0 }; // w:2 * h:3 * pixelByte:4 for (int i = 0; i < colorLength; i += NUM_4) { buffer[i] = 0x78; buffer[i + 1] = 0x83; diff --git a/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_test.cpp b/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_test.cpp index e2c12207db8325478181aa1f68d5459177bcce96..a5c3ae6a6393dcd0b201662c96a9766d750ab9c1 100644 --- a/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_test.cpp +++ b/frameworks/innerkitsimpl/test/unittest/pixel_map_test/pixel_map_test.cpp @@ -386,7 +386,7 @@ void InitOption(struct InitializationOptions& opts, const uint32_t width, const * @tc.desc: Create PixelMap * @tc.type: FUNC */ -HWTEST_F(PixelMapTest, PixelMapCreateTest001, TestSize.Level3) +HWTEST_F(PixelMapTest, PixelMapCreateTest001, TestSize.Level0) { GTEST_LOG_(INFO) << "PixelMapTest: PixelMapCreateTest001 start"; @@ -426,7 +426,7 @@ HWTEST_F(PixelMapTest, PixelMapCreateTest001, TestSize.Level3) * @tc.desc: Create PixelMap * @tc.type: FUNC */ -HWTEST_F(PixelMapTest, PixelMapCreateTest002, TestSize.Level3) +HWTEST_F(PixelMapTest, PixelMapCreateTest002, TestSize.Level0) { GTEST_LOG_(INFO) << "PixelMapTest: PixelMapCreateTest002 start"; @@ -468,7 +468,7 @@ HWTEST_F(PixelMapTest, PixelMapCreateTest002, TestSize.Level3) * @tc.desc: Create PixelMap * @tc.type: FUNC */ -HWTEST_F(PixelMapTest, PixelMapCreateTest003, TestSize.Level3) +HWTEST_F(PixelMapTest, PixelMapCreateTest003, TestSize.Level1) { GTEST_LOG_(INFO) << "PixelMapTest: PixelMapCreateTest003 start"; @@ -508,7 +508,7 @@ HWTEST_F(PixelMapTest, PixelMapCreateTest003, TestSize.Level3) * @tc.desc: Create PixelMap * @tc.type: FUNC */ -HWTEST_F(PixelMapTest, PixelMapCreateTest004, TestSize.Level3) +HWTEST_F(PixelMapTest, PixelMapCreateTest004, TestSize.Level1) { GTEST_LOG_(INFO) << "PixelMapTest: PixelMapCreateTest004 start"; diff --git a/frameworks/innerkitsimpl/test/unittest/plugin_texture_encode_test.cpp b/frameworks/innerkitsimpl/test/unittest/plugin_texture_encode_test.cpp index e22528276a9987eee144651e45b06da8b73599e8..34ac5e1884cf642715916866d96eb62be1790bab 100644 --- a/frameworks/innerkitsimpl/test/unittest/plugin_texture_encode_test.cpp +++ b/frameworks/innerkitsimpl/test/unittest/plugin_texture_encode_test.cpp @@ -386,7 +386,7 @@ HWTEST_F(PluginTextureEncodeTest, ASTCEncode005, TestSize.Level3) uint32_t setRet = astcEncoder.SetAstcEncode(stream, option, pixelMapPtr); ASSERT_EQ(setRet, SUCCESS); uint32_t astcRet = astcEncoder.ASTCEncode(); - ASSERT_EQ(astcRet, SUCCESS); + ASSERT_NE(astcRet, SUCCESS); option.quality = 20; setRet = astcEncoder.SetAstcEncode(stream, option, pixelMapPtr); @@ -429,7 +429,7 @@ HWTEST_F(PluginTextureEncodeTest, ASTCEncode006, TestSize.Level3) uint32_t setRet = astcEncoder.SetAstcEncode(stream, option, pixelMapPtr); ASSERT_EQ(setRet, SUCCESS); uint32_t astcRet = astcEncoder.ASTCEncode(); - ASSERT_EQ(astcRet, SUCCESS); + ASSERT_NE(astcRet, SUCCESS); option.quality = 20; setRet = astcEncoder.SetAstcEncode(stream, option, pixelMapPtr); @@ -473,7 +473,7 @@ HWTEST_F(PluginTextureEncodeTest, ASTCEncode007, TestSize.Level3) uint32_t setRet = astcEncoder.SetAstcEncode(stream, option, pixelMapPtr); ASSERT_EQ(setRet, SUCCESS); uint32_t astcRet = astcEncoder.ASTCEncode(); - ASSERT_EQ(astcRet, SUCCESS); + ASSERT_NE(astcRet, SUCCESS); if (output != nullptr) { free(output);