1 /* 2 * Copyright (c) 2020-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef UI_TEST_SPANNABLE_STRING_H 16 #define UI_TEST_SPANNABLE_STRING_H 17 18 #include "components/ui_scroll_view.h" 19 #include "font/ui_font.h" 20 #include "ui_test.h" 21 22 namespace OHOS { 23 class UITestSpannableString : public UITest { 24 public: UITestSpannableString()25 UITestSpannableString() {} ~UITestSpannableString()26 ~UITestSpannableString() {} 27 void SetUp() override; 28 void TearDown() override; 29 const UIView *GetTestView() override; 30 31 /* * 32 * @brief Test singleline Chinese display 33 */ 34 void UIKitSpannableStringTestNormal001(); 35 36 /* * 37 * @brief Test textStyle display 38 */ 39 void UIKitSpannableStringTestTextStyle001(); 40 41 /* * 42 * @brief Test textStyle display 43 */ 44 void UIKitSpannableStringTestFontSize001(); 45 46 /* * 47 * @brief Show an other way 48 */ 49 void UIKitSpannableStringTestFontSize002(); 50 51 /* * 52 * @brief Verify two fontId can be find. 53 */ 54 void UIKitSpannableStringTestFontId001(); 55 56 /* * 57 * @brief Test Set FontId 58 */ 59 void UIKitSpannableStringTestFontId002(); 60 61 private: 62 UIScrollView *container_ = nullptr; 63 void InnerTestTitle(const char *title); 64 }; 65 } 66 67 68 #endif 69