未验证 提交 fdca0510 编写于 作者: O openharmony_ci 提交者: Gitee

!579 修复image门禁测试用例

Merge pull request !579 from 郝烁/unittest
......@@ -57,7 +57,7 @@ namespace OHOS {
#define PNG_16_GRAY_IMAGE_PATH (IMAGE_DIR "png_16_gray.png")
#define PNG_24_RGB_IMAGE_PATH (IMAGE_DIR "png_24_rgb.png")
#define PNG_32_RGB_ALPHA_IMAGE_PATH (IMAGE_DIR "png_32_rgba.png")
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
#define GIF_IMAGE_PATH1 (IMAGE_DIR "gif_image1.gif")
#define GIF_IMAGE_PATH2 (IMAGE_DIR "gif_image2.gif")
#define GIF_IMAGE_PATH_ERROR (IMAGE_DIR "gif_error.gif")
......
......@@ -17,7 +17,7 @@
#include "common/screen.h"
#include "components/ui_label.h"
#include "default_resource/check_box_res.h"
#ifdef VERSION_LITE
#if (ENABLE_GIF == 1)
#include "components/ui_image_view.h"
#include "test_resource_config.h"
#endif
......@@ -42,7 +42,7 @@ void UITestImage::TearDown()
{
DeleteChildren(container_);
container_ = nullptr;
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
gifImageView_ = nullptr;
gifToGif_ = nullptr;
gifToJpeg_ = nullptr;
......@@ -69,7 +69,7 @@ const UIView* UITestImage::GetTestView()
UIKit_UIImage_Test_SetImage_012();
UIKit_UIImage_Test_SetImage_013();
UIKit_UIImage_Test_SetImage_014();
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
UIKit_UIImage_Test_SetImage_015();
UIKit_UIImage_Test_SetImage_016();
#endif
......@@ -382,7 +382,7 @@ void UITestImage::UIKit_UIImage_Test_SetImage_014()
}
}
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
void UITestImage::UIKit_UIImage_Test_SetImage_015()
{
if (container_ != nullptr) {
......
......@@ -27,7 +27,7 @@
#endif
namespace OHOS {
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
class UITestImage : public UITest, public OHOS::UIView::OnClickListener {
#else
class UITestImage : public UITest {
......@@ -51,7 +51,7 @@ public:
void UIKit_UIImage_Test_SetImage_012();
void UIKit_UIImage_Test_SetImage_013();
void UIKit_UIImage_Test_SetImage_014();
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
void UIKit_UIImage_Test_SetImage_015();
void UIKit_UIImage_Test_SetImage_016();
#endif
......@@ -59,12 +59,12 @@ public:
void UIKit_UIImage_Test_Resize_001();
private:
const char* GetCharByImageSrcType(ImageSrcType srcType) const;
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
bool OnClick(UIView &view, const ClickEvent& event) override;
void SetUpButton(UILabelButton* btn, const char* title);
#endif
UIScrollView* container_ = nullptr;
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
UIImageView* gifImageView_ = nullptr;
UILabelButton* gifToGif_ = nullptr;
UILabelButton* gifToJpeg_ = nullptr;
......
......@@ -94,7 +94,6 @@ if (ohos_kernel_type != "liteos_m") {
"events/release_event_unit_test.cpp",
"events/virtual_device_event_unit_test.cpp",
"font/ui_font_unit_test.cpp",
"image/image_load_unit_test.cpp",
"layout/flex_layout_unit_test.cpp",
"layout/grid_layout_unit_test.cpp",
"layout/list_layout_unit_test.cpp",
......
......@@ -98,7 +98,7 @@ HWTEST_F(UIImageViewTest, UIImageViewSetPosition_001, TestSize.Level0)
EXPECT_EQ(imageView_->GetHeight(), 0);
}
#ifndef VERSION_LITE
#if (ENABLE_GIF == 1)
/**
* @tc.name: UIImageViewSetSrc_001
* @tc.desc: Verify SetSrc function, correct gif path, equal.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册