• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 
16 #include "text_tdd_test.h"
17 #include "acelite_config.h"
18 #include "component_factory.h"
19 #include "js_app_environment.h"
20 #include "root_view.h"
21 #include "text_component.h"
22 #include "ui_label.h"
23 #include "ui_font.h"
24 #include "product_adapter.h"
25 
26 
27 namespace OHOS {
28 namespace ACELite {
TextTddTest()29 TextTddTest::TextTddTest():BaseTest()
30 {
31     componentNameId_ = KeyParser::ParseKeyId("text");
32 }
33 
ComponentTextAttributeSetValueTest001()34 void TextTddTest::ComponentTextAttributeSetValueTest001()
35 {
36     TDD_CASE_BEGIN();
37     /**
38      * @tc.steps: step1. set text attribute value = "hello world"
39      */
40     const char* expectTextValue = "hello world";
41     const char* valueStr = "value";
42     jerry_value_t textKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(valueStr));
43     jerry_value_t textValue = jerry_create_string(reinterpret_cast<const jerry_char_t *>(expectTextValue));
44     jerry_set_property(attrsObj_, textKey, textValue);
45     Component* textComponent = reinterpret_cast<TextComponent *>(GetRenderedComponent(componentNameId_));
46     UILabel* uilabelView = reinterpret_cast<UILabel *>(textComponent->GetComponentRootView());
47     jerry_release_value(textKey);
48     jerry_release_value(textValue);
49 
50     /**
51      * @tc.expected: step2. value == expectTextValue
52      */
53     if (uilabelView->GetText() != nullptr && !strcmp(uilabelView->GetText(), expectTextValue)) {
54         printf("%s pass\n", __FUNCTION__);
55     } else {
56         printf("%s fail\n", __FUNCTION__);
57     }
58     EXPECT_STREQ(uilabelView->GetText(), expectTextValue);
59 
60     /**
61      * @tc.expected: step3. update value, check value == expectTextValue2
62      */
63     const char* expectTextValue2 = "1234567890";
64     UpdateCharAttributeOrStyleValue(textComponent, "value", expectTextValue2, true);
65     if ((uilabelView->GetText() != nullptr) && !strcmp(uilabelView->GetText(), expectTextValue2)) {
66         printf("%s update test value pass\n", __FUNCTION__);
67     } else {
68         printf("%s update test value fail\n", __FUNCTION__);
69     }
70     EXPECT_STREQ(uilabelView->GetText(), expectTextValue2);
71 
72     /**
73      * @tc.expected: step4. update value witch excpetion expectTextIntValue , check value != expectTextIntValue
74      */
75     int expectTextIntValue = 100;
76     UpdateNumAttributeOrStyleValue(textComponent, "value", expectTextIntValue, true);
77     if ((uilabelView->GetText() != nullptr) && !strcmp(uilabelView->GetText(), "100")) {
78         printf("%s update test value 100 pass\n", __FUNCTION__);
79     } else {
80         printf("%s update test value 100 fail\n", __FUNCTION__);
81     }
82     EXPECT_TRUE(uilabelView->GetText() != nullptr);
83     EXPECT_STREQ(uilabelView->GetText(), "100");
84 
85     TDD_CASE_END();
86 }
87 
ComponentTextStyleSetColorTest002()88 void TextTddTest::ComponentTextStyleSetColorTest002()
89 {
90     TDD_CASE_BEGIN();
91     /**
92      * @tc.steps: step1. set text color value = 16777215
93      */
94     int expectColorValue = 16711680;
95     const char* colorStr = "color";
96     jerry_value_t textKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(colorStr));
97     jerry_value_t textColorValue = jerry_create_number(expectColorValue);
98 
99     jerry_set_property(styleObj_, textKey, textColorValue);
100 
101     Component* textComponent = reinterpret_cast<TextComponent *>(GetRenderedComponent(componentNameId_));
102     UILabel* uilabelView = reinterpret_cast<UILabel *>(textComponent->GetComponentRootView());
103 
104     jerry_release_value(textKey);
105     jerry_release_value(textColorValue);
106 
107     /**
108      * @tc.expected: step2. check text color == 16711680 (red color)
109      */
110     if (uilabelView->GetStyle(STYLE_TEXT_COLOR) == GetRGBColor(expectColorValue).full) {
111         printf("%s pass\n", __FUNCTION__);
112     } else {
113         printf("%s fail\n", __FUNCTION__);
114     }
115     EXPECT_EQ(uilabelView->GetStyle(STYLE_TEXT_COLOR), GetRGBColor(expectColorValue).full);
116 
117     /**
118      * @tc.expected: step3. update text color with normal expectColorValue2,check text color == expectColorValue2
119      */
120     int32_t expectColorValue2 = 16777215;
121     UpdateNumAttributeOrStyleValue(textComponent, colorStr, expectColorValue2, false);
122     if (uilabelView->GetStyle(STYLE_TEXT_COLOR) == GetRGBColor(expectColorValue2).full) {
123         printf("%s update color pass\n", __FUNCTION__);
124     } else {
125         printf("%s update color fail\n", __FUNCTION__);
126     }
127     EXPECT_EQ(uilabelView->GetStyle(STYLE_TEXT_COLOR), GetRGBColor(expectColorValue2).full);
128 
129     /**
130      * @tc.expected: step4. update text color with overflow expectColorValue3,check text color == expectColorValue3
131      */
132     int32_t expectColorValue3 = 16777216;
133     UpdateNumAttributeOrStyleValue(textComponent, colorStr, expectColorValue3, false);
134     if (uilabelView->GetStyle(STYLE_TEXT_COLOR) == GetRGBColor(expectColorValue3).full) {
135         printf("%s update overflow color pass\n", __FUNCTION__);
136     } else {
137         printf("%s update overflow color fail\n", __FUNCTION__);
138     }
139     EXPECT_EQ(uilabelView->GetStyle(STYLE_TEXT_COLOR), GetRGBColor(expectColorValue3).full);
140 
141     TDD_CASE_END();
142 }
143 
ComponentTextStyleSetOverflowTest003()144 void TextTddTest::ComponentTextStyleSetOverflowTest003()
145 {
146     TDD_CASE_BEGIN();
147     /**
148      * @tc.steps: step1. set text overflow = clip
149      */
150     const char* expectOverflowClip = "clip";
151     const char* textOverflow = "textOverflow";
152     const char* height = "height";
153     const char* width = "width";
154     int textHeight = 0;
155     int textWidth = 0;
156     JerrySetNumberProperty(styleObj_, height, textHeight);
157     JerrySetNumberProperty(styleObj_, width, textWidth);
158     JerrySetStringProperty(styleObj_, textOverflow, expectOverflowClip);
159     Component* textComponent = reinterpret_cast<TextComponent *>(GetRenderedComponent(componentNameId_));
160     UILabel* uilabelView = reinterpret_cast<UILabel *>(textComponent->GetComponentRootView());
161     /**
162      * @tc.expected: step2. check uikit uilabelView  == UILabel::LINE_BREAK_CLIP
163      */
164     if (uilabelView->GetLineBreakMode() == UILabel::LINE_BREAK_CLIP) {
165         printf("%s set OverFlow clip pass\n", __FUNCTION__);
166     } else {
167         printf("%s set OverFlow clip fail\n", __FUNCTION__);
168     }
169     EXPECT_EQ(uilabelView->GetLineBreakMode(), UILabel::LINE_BREAK_CLIP);
170 
171     /**
172      * @tc.expected: step3. update text Overflow = "ellipsis"
173      * check uikit uilabelView  == UILabel::LINE_BREAK_ELLIPSIS
174      */
175     const char* expectOverflowEllipsis = "ellipsis";
176     UpdateCharAttributeOrStyleValue(textComponent, textOverflow, expectOverflowEllipsis, false);
177     if (uilabelView->GetLineBreakMode() == UILabel::LINE_BREAK_ELLIPSIS) {
178         printf("%s update OverFlow ellipsis pass\n", __FUNCTION__);
179     } else {
180         printf("%s update OverFlow ellipsis fail\n", __FUNCTION__);
181     }
182     EXPECT_EQ(uilabelView->GetLineBreakMode(), UILabel::LINE_BREAK_ELLIPSIS);
183 
184     /**
185      * @tc.expected: step4. update text Overflow = "break"
186      * check uikit uilabelView  == UILabel::LINE_BREAK_WRAP
187      */
188     const char* expectOverflowBreak = "break";
189     UpdateCharAttributeOrStyleValue(textComponent, textOverflow, expectOverflowBreak, false);
190     if (uilabelView->GetLineBreakMode() == UILabel::LINE_BREAK_WRAP) {
191         printf("%s update OverFlow break pass\n", __FUNCTION__);
192     } else {
193         printf("%s update OverFlow break fail\n", __FUNCTION__);
194     }
195     EXPECT_EQ(uilabelView->GetLineBreakMode(), UILabel::LINE_BREAK_WRAP);
196 
197     /**
198      * @tc.expected: step5. update text Overflow = "expand"
199      * check uikit uilabelView  == UILabel::LINE_BREAK_ADAPT
200      */
201     const char* expectOverflowExpand = "expand";
202     UpdateCharAttributeOrStyleValue(textComponent, textOverflow, expectOverflowExpand, false);
203     if (uilabelView->GetLineBreakMode() == UILabel::LINE_BREAK_ADAPT) {
204         printf("%s update OverFlow expand pass\n", __FUNCTION__);
205     } else {
206         printf("%s update OverFlow expand fail\n", __FUNCTION__);
207     }
208     EXPECT_EQ(uilabelView->GetLineBreakMode(), UILabel::LINE_BREAK_ADAPT);
209 
210     TDD_CASE_END();
211 }
212 
ComponentTextStyleSetLetterSpacingTest004()213 void TextTddTest::ComponentTextStyleSetLetterSpacingTest004()
214 {
215     TDD_CASE_BEGIN();
216     /**
217      * @tc.steps: step1. set text letterSpacing value = 10
218      */
219     int expectLetterSpacingValue = 10;
220     const char* letterSpacingStr = "letterSpacing";
221     jerry_value_t textKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(letterSpacingStr));
222     jerry_value_t textLetterSpacingValue = jerry_create_number(expectLetterSpacingValue);
223     jerry_set_property(styleObj_, textKey, textLetterSpacingValue);
224     Component* textComponent = reinterpret_cast<TextComponent *>(GetRenderedComponent(componentNameId_));
225     UILabel* uilabelView = reinterpret_cast<UILabel *>(textComponent->GetComponentRootView());
226 
227     /**
228      * @tc.expected: step2. check uikit uilabel letterSpace == expectLetterSpacingValue
229      */
230     if (uilabelView->GetStyle(STYLE_LETTER_SPACE) == expectLetterSpacingValue) {
231         printf("%s update letterSpace pass\n", __FUNCTION__);
232     } else {
233         printf("%s update letterSpace fail\n", __FUNCTION__);
234     }
235     EXPECT_EQ(uilabelView->GetStyle(STYLE_LETTER_SPACE), expectLetterSpacingValue);
236     jerry_release_value(textKey);
237     jerry_release_value(textLetterSpacingValue);
238 
239     /**
240      * @tc.expected: step3. update letterSpace, check uikit uilabel letterSpace == expectLetterSpacingValue2
241      */
242     int32_t expectLetterSpacingValue2 = 255;
243     UpdateNumAttributeOrStyleValue(textComponent, letterSpacingStr, expectLetterSpacingValue2, false);
244     if (uilabelView->GetStyle(STYLE_LETTER_SPACE) == expectLetterSpacingValue2) {
245         printf("%s update normal letterSpace pass\n", __FUNCTION__);
246     } else {
247         printf("%s update normal letterSpace fail\n", __FUNCTION__);
248     }
249     EXPECT_EQ(uilabelView->GetStyle(STYLE_LETTER_SPACE), expectLetterSpacingValue2);
250 
251     /**
252      * @tc.expected: step4. update letterSpace with exception value,
253      * check uikit uilabel letterSpace != expectLetterSpacingValue3
254      */
255     int32_t expectLetterSpacingValue3 = 32768;
256     UpdateNumAttributeOrStyleValue(textComponent, letterSpacingStr, expectLetterSpacingValue3, false);
257     if (uilabelView->GetStyle(STYLE_LETTER_SPACE) != expectLetterSpacingValue3) {
258         printf("%s update overflow letterSpace  pass\n", __FUNCTION__);
259     } else {
260         printf("%s update overflow letterSpace fail\n", __FUNCTION__);
261     }
262     EXPECT_NE(uilabelView->GetStyle(STYLE_LETTER_SPACE), expectLetterSpacingValue3);
263 
264     TDD_CASE_END();
265 }
266 
ComponentTextStyleSetAlignTest005()267 void TextTddTest::ComponentTextStyleSetAlignTest005()
268 {
269     TDD_CASE_BEGIN();
270     /**
271      * @tc.steps: step1. set text Align  = "left"
272      */
273     const char* expectLeftAlign = "left";
274     const char* textAlign = "textAlign";
275     jerry_value_t textKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(textAlign));
276     jerry_value_t textAlignValue = jerry_create_string(reinterpret_cast<const jerry_char_t *>(expectLeftAlign));
277     jerry_set_property(styleObj_, textKey, textAlignValue);
278     Component* textComponent = reinterpret_cast<TextComponent *>(GetRenderedComponent(componentNameId_));
279     UILabel* uilabelView = reinterpret_cast<UILabel *>(textComponent->GetComponentRootView());
280     jerry_release_value(textKey);
281     jerry_release_value(textAlignValue);
282     /**
283      * @tc.expected: step2. jsfwk render, check text align == UITextLanguageAlignment::TEXT_ALIGNMENT_LEFT
284      */
285     if (uilabelView->GetHorAlign() == UITextLanguageAlignment::TEXT_ALIGNMENT_LEFT) {
286         printf("%s update text ALign left pass\n", __FUNCTION__);
287     } else {
288         printf("%s update text ALign left fail\n", __FUNCTION__);
289     }
290     EXPECT_EQ(uilabelView->GetHorAlign(), UITextLanguageAlignment::TEXT_ALIGNMENT_LEFT);
291 
292     /**
293      * @tc.expected: step2. update align = right, check text align == UITextLanguageAlignment::TEXT_ALIGNMENT_RIGHT
294      */
295     const char* expectRightAlign = "right";
296     UpdateCharAttributeOrStyleValue(textComponent, textAlign, expectRightAlign, false);
297     if (uilabelView->GetHorAlign() == UITextLanguageAlignment::TEXT_ALIGNMENT_RIGHT) {
298         printf("%s update text ALign right pass\n", __FUNCTION__);
299     } else {
300         printf("%s update text ALign right fail\n", __FUNCTION__);
301     }
302     EXPECT_EQ(uilabelView->GetHorAlign(), UITextLanguageAlignment::TEXT_ALIGNMENT_RIGHT);
303 
304     /**
305      * @tc.expected: step3. update align = center, check text align == UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER
306      */
307     const char* expectCenterAlign = "center";
308     UpdateCharAttributeOrStyleValue(textComponent, textAlign, expectCenterAlign, false);
309     if (uilabelView->GetHorAlign() == UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER) {
310         printf("%s update text ALign center pass\n", __FUNCTION__);
311     } else {
312         printf("%s update text ALign center fail\n", __FUNCTION__);
313     }
314     EXPECT_EQ(uilabelView->GetHorAlign(), UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);
315 
316     TDD_CASE_END();
317 }
318 
ComponentTextStyleSetSizeFamilyTest006()319 void TextTddTest::ComponentTextStyleSetSizeFamilyTest006()
320 {
321     TDD_CASE_BEGIN();
322     /**
323      * @tc.steps: step1. set text fontSize = 30, fontFamily = HYQiHei-65S
324      */
325     const char *textSize = "fontSize";
326     int expectSize = 30;
327     jerry_value_t textSizetKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(textSize));
328     jerry_value_t textSizeValue = jerry_create_number(expectSize);
329     jerry_set_property(styleObj_, textSizetKey, textSizeValue);
330     const char *textFamily = "fontFamily";
331     const char *expectFamily = "HYQiHei-65S";
332     jerry_value_t textFamilyKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(textFamily));
333     jerry_value_t textFamilyValue = jerry_create_string(reinterpret_cast<const jerry_char_t *>(expectFamily));
334     const char *expectTextValue = "hello world";
335     const char *valueTag = "value";
336     JerrySetStringProperty(attrsObj_, valueTag, expectTextValue);
337     Component *textComponent = reinterpret_cast<TextComponent *>(GetRenderedComponent(componentNameId_));
338     UILabel *uilabelView = reinterpret_cast<UILabel *>(textComponent->GetComponentRootView());
339     jerry_release_value(textSizetKey);
340     jerry_release_value(textSizeValue);
341     jerry_release_value(textFamilyKey);
342     jerry_release_value(textFamilyValue);
343 
344     /**
345      * @tc.expected: step2. check text fontid == UITextLanguageFontId::F_HYQIHEI_65S_30_4
346      */
347     UIFont *font = UIFont::GetInstance();
348     if (uilabelView->GetFontId() == font->GetFontId(expectFamily, expectSize)) {
349         printf("%s set text size&family pass\n", __FUNCTION__);
350     } else {
351         printf("%s set text size&family fail\n", __FUNCTION__);
352     }
353     EXPECT_EQ(uilabelView->GetFontId(), font->GetFontId(expectFamily, expectSize));
354 
355     /**
356      * @tc.expected: step3. update fontSize =38, check text fontid == UITextLanguageFontId::F_HYQIHEI_65S_38_4
357      */
358     int expectVidaLargerSize = 38;
359     UpdateNumAttributeOrStyleValue(textComponent, textSize, expectVidaLargerSize, false);
360     const char *expectVidaLargerFamily = "HYQiHei-65S";
361     UpdateCharAttributeOrStyleValue(textComponent, textFamily, expectVidaLargerFamily, false);
362     if (uilabelView->GetFontId() == font->GetFontId(expectVidaLargerFamily, expectVidaLargerSize)) {
363         printf("%s update text size&family pass\n", __FUNCTION__);
364     } else {
365         printf("%s update text size&family fail\n", __FUNCTION__);
366     }
367     EXPECT_EQ(uilabelView->GetFontId(), font->GetFontId(expectVidaLargerFamily, expectVidaLargerSize));
368 
369     /**
370      * @tc.expected: step4. update fontFamily with exception value "helloWorld",
371      * check text fontid == UITextLanguageFontId::F_HYQIHEI_65S_38_4
372      */
373     /* set last available fontid instead of exceptionFamily */
374     const char *expectExceptionFamily = "helloWorld";
375     UpdateCharAttributeOrStyleValue(textComponent, textFamily, expectExceptionFamily, false);
376 
377     if (uilabelView->GetFontId() == font->GetFontId(expectVidaLargerFamily, expectVidaLargerSize)) {
378         printf("%s  update text exception size&family pass\n", __FUNCTION__);
379     } else {
380         printf("%s update text  exception size&family fail\n", __FUNCTION__);
381     }
382     EXPECT_EQ(uilabelView->GetFontId(), font->GetFontId(expectVidaLargerFamily, expectVidaLargerSize));
383 
384     TDD_CASE_END();
385 }
386 
387 bool g_updateDefaultFontFlag = false;
UpdateDefaultFontTest(const char * curLanguage,const char * curOrigion,bool hasJson)388 void UpdateDefaultFontTest(const char* curLanguage, const char* curOrigion, bool hasJson)
389 {
390     g_updateDefaultFontFlag = true;
391 }
392 
ComponentTextStyleSetLineHeightTest007()393 void TextTddTest::ComponentTextStyleSetLineHeightTest007()
394 {
395     TDD_CASE_BEGIN();
396     /**
397      * @tc.name: ComponentTextStyleSetLineHeightTest007
398      * @tc.desc: Test RegUpdateDefaultFontHandler function.
399      */
400     g_updateDefaultFontFlag = false;
401     ProductAdapter::RegUpdateDefaultFontHandler(UpdateDefaultFontTest);
402     ProductAdapter::UpdateDefaultFont();
403     EXPECT_TRUE(g_updateDefaultFontFlag);
404     TDD_CASE_END();
405 }
406 
ComponentTextStyleSetLineHeightTest008()407 void TextTddTest::ComponentTextStyleSetLineHeightTest008()
408 {
409     TDD_CASE_BEGIN();
410     /**
411      * @tc.steps: step1. set text fontSize = 30
412      */
413     const char *textSize = "fontSize";
414     int expectSize = 30;
415     jerry_value_t textSizetKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(textSize));
416     jerry_value_t textSizeValue = jerry_create_number(expectSize);
417     jerry_set_property(styleObj_, textSizetKey, textSizeValue);
418     const char *expectTextValue = "hello world";
419     const char *valueTag = "value";
420     JerrySetStringProperty(attrsObj_, valueTag, expectTextValue);
421 
422     /**
423      * @tc.expected: step2. set lineHeight = 50, check uikit uilabel lineHeight == expectLineHeight
424      */
425     const char *lineHeight = "lineHeight";
426     int64_t expectLineHeight = 50; // 50: expect lineHeight
427     jerry_value_t lineHeightKey = jerry_create_string(reinterpret_cast<const jerry_char_t *>(lineHeight));
428     jerry_value_t lineHeightValue = jerry_create_number(expectLineHeight);
429     jerry_set_property(styleObj_, lineHeightKey, lineHeightValue);
430 
431     Component *textComponent = reinterpret_cast<TextComponent *>(GetRenderedComponent(componentNameId_));
432     UILabel *uilabelView = reinterpret_cast<UILabel *>(textComponent->GetComponentRootView());
433     jerry_release_value(textSizetKey);
434     jerry_release_value(textSizeValue);
435     jerry_release_value(lineHeightKey);
436     jerry_release_value(lineHeightValue);
437     EXPECT_EQ(uilabelView->GetStyle(STYLE_LINE_HEIGHT), expectLineHeight);
438 
439     /**
440      * @tc.expected: step3. update lineHeight = 30, check uikit uilabel lineHeight == expectLineHeight
441      */
442     expectLineHeight = 30; // 30: expect lineHeight update
443     UpdateNumAttributeOrStyleValue(textComponent, lineHeight, expectLineHeight, false);
444     EXPECT_EQ(uilabelView->GetStyle(STYLE_LINE_HEIGHT), expectLineHeight);
445 
446     TDD_CASE_END();
447 }
448 
RunTests()449 void TextTddTest::RunTests()
450 {
451     ComponentTextAttributeSetValueTest001();
452     ComponentTextStyleSetColorTest002();
453     ComponentTextStyleSetOverflowTest003();
454     ComponentTextStyleSetLetterSpacingTest004();
455     ComponentTextStyleSetAlignTest005();
456     ComponentTextStyleSetSizeFamilyTest006();
457     ComponentTextStyleSetLineHeightTest007();
458     ComponentTextStyleSetLineHeightTest008();
459 }
460 
461 #ifdef TDD_ASSERTIONS
462 /**
463  * @tc.name:ComponentTextAttributeSetValueTest001
464  * @tc.desc: Verify text value can set normally.
465  */
466 HWTEST_F(TextTddTest, textAttr001, TestSize.Level1)
467 {
468     TextTddTest::ComponentTextAttributeSetValueTest001();
469 }
470 
471 /**
472  * @tc.name:ComponentTextStyleSetColorTest002
473  * @tc.desc: Verify text color value.
474  */
475 HWTEST_F(TextTddTest, textStyle002, TestSize.Level1)
476 {
477     TextTddTest::ComponentTextStyleSetColorTest002();
478 }
479 
480 /**
481  * @tc.name:ComponentTextStyleSetOverflowTest003
482  * @tc.desc: Verify text color value.
483  */
484 HWTEST_F(TextTddTest, textStyle003, TestSize.Level0)
485 {
486     TextTddTest::ComponentTextStyleSetOverflowTest003();
487 }
488 
489 /**
490  * @tc.name:ComponentTextStyleSetLetterSpacingTest004
491  * @tc.desc: Verify text letterSpacing value.
492  */
493 HWTEST_F(TextTddTest, textStyle004, TestSize.Level1)
494 {
495     TextTddTest::ComponentTextStyleSetLetterSpacingTest004();
496 }
497 
498 /**
499  * @tc.name:ComponentTextStyleSetAlignTest005
500  * @tc.desc: Verify text color value.
501  */
502 HWTEST_F(TextTddTest, textStyle005, TestSize.Level1)
503 {
504     TextTddTest::ComponentTextStyleSetAlignTest005();
505 }
506 
507 HWTEST_F(TextTddTest, textStyle007, TestSize.Level1)
508 {
509     TextTddTest::ComponentTextStyleSetLineHeightTest007();
510 }
511 
512 HWTEST_F(TextTddTest, textStyle008, TestSize.Level1)
513 {
514     TextTddTest::ComponentTextStyleSetLineHeightTest008();
515 }
516 
517 #endif
518 } // namespace ACELite
519 } // namespace OHOS
520