ui_test_font.h 2.7 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
     * @brief Test multiline line text color display
     */
    void UIKitFontTestDispaly008();
W
wangtiantian 已提交
71

72 73 74 75 76 77 78 79 80 81
    /**
     * @brief Test text rotate
     */
    void UIKitFontTestDispaly009();

    /**
     * @brief Test text rotate
     */
    void UIKitFontTestDispaly010();

W
wangtiantian 已提交
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
    /**
     * @brief Test font baseline alignment
     */
    void UIKitFontTestBaseline001();

    /**
     * @brief Test font baseline alignment
     */
    void UIKitFontTestBaseline002();

    /**
     * @brief Test font lineheight alignment
     */
    void UIKitFontTestLineHeight001();

    /**
     * @brief Test font lineheight alignment
     */
    void UIKitFontTestLineHeight002();

W
wangtiantian 已提交
102 103 104
#if ENABLE_MULTI_FONT
    /**
     * @brief Test multilingual display
M
mamingshuai 已提交
105
     */
W
wangtiantian 已提交
106
    void UIKitFontMultiLanguage001();
M
mamingshuai 已提交
107

W
wangtiantian 已提交
108 109 110 111 112
    /**
     * @brief Test multilingual display
     */
    void UIKitFontMultiLanguage002();
#endif // ENABLE_MULTI_FONT
M
mamingshuai 已提交
113 114 115 116 117 118
private:
    UIScrollView* container_ = nullptr;
    void InnerTestTitle(const char* title);
};
} // namespace OHOS
#endif // UI_TEST_FONT_H