X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-internal%2Futc-Dali-Text-ViewModel.cpp;h=f243f0830783da8d6ab6ba65d41a382aea210d5d;hb=b86fa7f2bedebe580b0e9a20f9b42cf2d628fafa;hp=49d36e0b5ecb31daa34863ffc617d666f3501f2f;hpb=cce53acd094585426f1aebbaf02169141f63b51d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git
diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-ViewModel.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-ViewModel.cpp
old mode 100644
new mode 100755
index 49d36e0..f243f08
--- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-ViewModel.cpp
+++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-ViewModel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,14 +49,14 @@ const char* LOREM_IPSUM = "Lorem ipsum dolor sit amet, aeque definiebas ea mei,
"Aliquip sanctůs delicáta quà Äá, et natum aliquam est?\n"
"Asšúm sapÄret usu ůť.\n"
"SÃÅ¥ ut apeirián laboramúš percipitur, sůas haÅum Ãn éos?\n";
-const Vector2 LOREM_SCROLL_POSITION( 0.f, -208.f );
-const Length LOREM_NUMBER_OF_LINES = 32u;
+const Vector2 LOREM_SCROLL_POSITION( 0.f, -284.f );
+const Length LOREM_NUMBER_OF_LINES = 36u;
const Length LOREM_NUMBER_OF_LINES_ELIDED = 21u;
const Length LOREM_NUMBER_OF_GLYPHS = 632;
-const Length LOREM_NUMBER_OF_GLYPHS_ELIDED = 397u;
+const Length LOREM_NUMBER_OF_GLYPHS_ELIDED = 373u;
// The expected layout size for UtcDaliTextViewModelGetLayoutSize
-const Size LAYOUT_SIZE( 190.f, 48.f );
+const Size LAYOUT_SIZE( 182.f, 45.f );
// The expected color indices for UtcDaliTextViewModelGetColors
const ColorIndex COLOR_INDICES[] = { 0u, 0u, 0u, 0u, 0u, 0u, 1u, 1u, 1u, 2u, 2u, 2u, 2u, 2u, 1u, 1u, 1u, 1u, 1u, 3u, 1u, 1u, 1u, 0u, 0u, 0u, 0u };
@@ -132,16 +132,16 @@ bool ElideTest( const ElideData& data )
const LineRun& lastLine = *( model->GetLines() + numberOfLines - 1u );
const Length numberOfLastLineGlyphs = data.numberOfGlyphs - lastLine.glyphRun.glyphIndex;
- std::cout << " last line alignment offset : " << lastLine.alignmentOffset << std::endl;
+ std::cout << " last line alignment offset : " << floor(lastLine.alignmentOffset) << std::endl;
for( unsigned int index = 0u; index < numberOfLastLineGlyphs; ++index )
{
- if( *( data.positions + index ) != ( lastLine.alignmentOffset + ( *( layoutBuffer + lastLine.glyphRun.glyphIndex + index ) ).x ) )
+ if( *( data.positions + index ) != floor(lastLine.alignmentOffset + ( *( layoutBuffer + lastLine.glyphRun.glyphIndex + index ) ).x ) )
{
std::cout << " different layout :";
for( unsigned int i = 0; i < numberOfLastLineGlyphs; ++i )
{
- std::cout << " " << ( lastLine.alignmentOffset + ( *( layoutBuffer + lastLine.glyphRun.glyphIndex + i ) ).x );
+ std::cout << " " << floor( lastLine.alignmentOffset + ( *( layoutBuffer + lastLine.glyphRun.glyphIndex + i ) ).x );
}
std::cout << std::endl;
std::cout << " expected :";
@@ -583,13 +583,13 @@ int UtcDaliTextViewModelElideText02(void)
Size textSize00( 100.f, 100.f );
Size textSize01( 80.f, 100.f );
- float positions01[] = { 0.f, 9.f, 17.f, 27.f, 35.f, 37.f, 46.f, 56.f };
+ float positions01[] = { 0.f, 8.f, 16.f, 26.f, 34.f, 43.f, 47.f, 58.f, 64.0f };
Size textSize02( 80.f, 100.f );
- float positions02[] = { 72.f, 63.f, 54.f, 50.f, 43.f, 38.f, 30.f, 11.f };
+ float positions02[] = { 69.f, 63.f, 58.f, 50.f, 45.f, 41.f, 32.f, 23.f, 9.f };
Size textSize03( 80.f, 100.f );
- float positions03[] = { 77.f, 76.f, 71.f, 62.f, 59.f, 52.f, 47.f, 42.f, 39.f, 35.f, 32.f, 13.f };
+ float positions03[] = { 54.f, 47.f, 44.f, 41.f, 36.f, 29.f, 25.f, 20.f, 13.f, 8.f, 4.f, 6.f };
Size textSize04( 80.f, 10.f );
float positions04[] = { 2.f };
@@ -609,7 +609,7 @@ int UtcDaliTextViewModelElideText02(void)
"Lorem ipsum dolor sit amet, aeque definiebas ea mei, posse iracundia ne cum.",
textSize01,
5u,
- 42u,
+ 36u,
positions01
},
{
@@ -617,7 +617,7 @@ int UtcDaliTextViewModelElideText02(void)
"×¦×¢× ×¢× ×ש×× ×××צת ×××ר×× ×, ×× ×××× ×©× ××¨× ×¡×¨××× ×××¢, ×§×¨× ×ת שפ×ת ××פ××.",
textSize02,
5u,
- 49u,
+ 44u,
positions02
},
{
@@ -625,7 +625,7 @@ int UtcDaliTextViewModelElideText02(void)
"ع٠اÙÙÙØ· دÙسÙ
بر اÙØ¥Ù
داد باÙ, بÙÙ Ùتر٠شعار ÙÙ. ÙÙ
Ù Ù
٠اÙÙ
برÙ
Ø© اÙÙÙØ· باÙسÙطرة, Ø£Ù
ÙتÙ
تØرÙÙ Ùبغطاء, عدÙ
ÙÙ Ùإعادة ÙØ¥ÙاÙ
Ø© رجÙعÙÙ
.",
textSize03,
5u,
- 79u,
+ 62u,
positions03
},
{