ui_test_font.h 2.1 KB
Newer Older
M
mamingshuai 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
/*
 * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef UI_TEST_FONT_H
#define UI_TEST_FONT_H

#include "components/ui_scroll_view.h"
#include "font/ui_font.h"
#include "ui_test.h"

namespace OHOS {
class UITestFont : public UITest {
public:
    UITestFont() {}
    ~UITestFont() {}
    void SetUp() override;
    void TearDown() override;
G
guyuanzhang 已提交
30
    const UIView* GetTestView() override;
M
mamingshuai 已提交
31 32

    /**
W
wangtiantian 已提交
33
     * @brief Test single line Chinese display
M
mamingshuai 已提交
34
     */
W
wangtiantian 已提交
35
    void UIKitFontTestDispaly001();
M
mamingshuai 已提交
36 37

    /**
W
wangtiantian 已提交
38
     * @brief Test multiline Chinese display
M
mamingshuai 已提交
39
     */
W
wangtiantian 已提交
40
    void UIKitFontTestDispaly002();
M
mamingshuai 已提交
41 42

    /**
W
wangtiantian 已提交
43
     * @brief Test single line English display
M
mamingshuai 已提交
44
     */
W
wangtiantian 已提交
45
    void UIKitFontTestDispaly003();
M
mamingshuai 已提交
46 47

    /**
W
wangtiantian 已提交
48
     * @brief Test multiline English display
M
mamingshuai 已提交
49
     */
W
wangtiantian 已提交
50
    void UIKitFontTestDispaly004();
M
mamingshuai 已提交
51 52

    /**
W
wangtiantian 已提交
53
     * @brief Test single line Chinese and English display
M
mamingshuai 已提交
54
     */
W
wangtiantian 已提交
55
    void UIKitFontTestDispaly005();
M
mamingshuai 已提交
56 57

    /**
W
wangtiantian 已提交
58
     * @brief Test multiline Chinese and English display
M
mamingshuai 已提交
59
     */
W
wangtiantian 已提交
60
    void UIKitFontTestDispaly006();
M
mamingshuai 已提交
61 62

    /**
W
wangtiantian 已提交
63
     * @brief Test single line text color display
M
mamingshuai 已提交
64
     */
W
wangtiantian 已提交
65
    void UIKitFontTestDispaly007();
M
mamingshuai 已提交
66 67

    /**
W
wangtiantian 已提交
68 69 70 71 72 73
     * @brief Test multiline line text color display
     */
    void UIKitFontTestDispaly008();
#if ENABLE_MULTI_FONT
    /**
     * @brief Test multilingual display
M
mamingshuai 已提交
74
     */
W
wangtiantian 已提交
75
    void UIKitFontMultiLanguage001();
M
mamingshuai 已提交
76

W
wangtiantian 已提交
77 78 79 80 81
    /**
     * @brief Test multilingual display
     */
    void UIKitFontMultiLanguage002();
#endif // ENABLE_MULTI_FONT
M
mamingshuai 已提交
82 83 84 85 86 87
private:
    UIScrollView* container_ = nullptr;
    void InnerTestTitle(const char* title);
};
} // namespace OHOS
#endif // UI_TEST_FONT_H