X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-internal%2Futc-Dali-Text-Cursor.cpp;h=9c0842eb944e45c2b6f28bb00098fc770fc32d04;hb=38dc9b457733e9e0813bbe484d1631e2754c3b66;hp=2a5ae461cc351888c8e0e177dfba22382525a0c0;hpb=d26f555fd84d43b0a3e650c66a0e626e841dd9c6;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Cursor.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Cursor.cpp old mode 100644 new mode 100755 index 2a5ae46..9c0842e --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Cursor.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Cursor.cpp @@ -97,8 +97,7 @@ bool GetClosestLineTest( const GetClosestLineData& data ) std::cout << " testing : " << data.description << std::endl; // 1) Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size textArea(400.f, 600.f); Size layoutSize; @@ -110,9 +109,12 @@ bool GetClosestLineTest( const GetClosestLineData& data ) fontDescriptionRuns, options, layoutSize, - logicalModel, - visualModel, - metrics ); + textModel, + metrics, + false ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; for( unsigned int index = 0; index < data.numberOfTests; ++index ) { @@ -141,8 +143,7 @@ bool GetClosestCursorIndexTest( const GetClosestCursorIndexData& data ) std::cout << " testing : " << data.description << std::endl; // 1) Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size textArea(400.f, 600.f); Size layoutSize; @@ -154,9 +155,12 @@ bool GetClosestCursorIndexTest( const GetClosestCursorIndexData& data ) fontDescriptionRuns, options, layoutSize, - logicalModel, - visualModel, - metrics ); + textModel, + metrics, + false ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; for( unsigned int index = 0; index < data.numberOfTests; ++index ) { @@ -189,8 +193,7 @@ bool GetCursorPositionTest( const GetCursorPositionData& data ) std::cout << " testing : " << data.description << std::endl; // 1) Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size textArea(400.f, 600.f); Size layoutSize; @@ -202,9 +205,12 @@ bool GetCursorPositionTest( const GetCursorPositionData& data ) fontDescriptionRuns, options, layoutSize, - logicalModel, - visualModel, - metrics ); + textModel, + metrics, + false ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; GetCursorPositionParameters parameters; parameters.visualModel = visualModel; @@ -240,8 +246,7 @@ bool FindSelectionIndicesTest( const FindSelectionIndicesData& data ) std::cout << " testing : " << data.description << std::endl; // 1) Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size textArea(400.f, 600.f); Size layoutSize; @@ -253,9 +258,12 @@ bool FindSelectionIndicesTest( const FindSelectionIndicesData& data ) fontDescriptionRuns, options, layoutSize, - logicalModel, - visualModel, - metrics ); + textModel, + metrics, + false ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; for( unsigned int index = 0; index < data.numberOfTests; ++index ) { @@ -380,7 +388,7 @@ int UtcDaliGetClosestCursorIndex(void) float visualX02[] = { -100.f, 1000.f, 60.f, 79.f, 83.f, 148.f, 99.f }; float visualY02[] = { -100.f, 1000.f, 12.f, 12.f, 12.f, 12.f, 12.f }; CharacterHitTest::Mode mode02[] = { CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP }; - CharacterIndex logicalIndex02[] = { 0, 21u, 7u, 10u, 11u, 13u, 20u }; + CharacterIndex logicalIndex02[] = { 0, 21u, 8u, 11u, 11u, 13u, 20u }; bool isCharacterHit02[] = { false, false, true, true, true, true, true }; float visualX03[] = { 19.f, 104.f, -2.f, 127.f }; @@ -404,13 +412,13 @@ int UtcDaliGetClosestCursorIndex(void) CharacterHitTest::Mode mode04[] = { CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP }; - CharacterIndex logicalIndex04[] = { 0, 5u, 6u, 11u, 11u, + CharacterIndex logicalIndex04[] = { 0, 6u, 6u, 11u, 11u, 12u, 16u, 17u, 21u, 21u, 22u, 25u, 31u, 32u, 34u, 40u, 40u, 41u }; bool isCharacterHit04[] = { false, true, true, false, false, - false, true, true, true, false, - false, true, true, true, true, true, false }; + false, true, true, false, false, + false, true, true, true, true, false, false }; // 0 10 20 30 40 46 // abcשנבdefג קכghiעיןjk lחלךmnoצמם pqrפרףstuד אוvwxה @@ -443,12 +451,12 @@ int UtcDaliGetClosestCursorIndex(void) CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP, CharacterHitTest::TAP }; - CharacterIndex logicalIndex05[] = { 0, 10u, 20u, 30u, 40u, 45u, - 46u, 50u, 60u, 70u, 80u, 92u, - 93u, 100u, 110u, 120u, 130u, 138u, - 139u, 150u, 160u, 170u, 180u, 185u, - 186u, 190u, 200u, 210u, 220u, 232u, - 233u, 240u, 250u, 260u, 265u }; + CharacterIndex logicalIndex05[] = { 0, 10u, 20u, 30u, 40u, 46u, + 47u, 52u, 62u, 71u, 82u, 93u, + 94u, 99u, 112u, 122u, 131u, 140u, + 141u, 153u, 162u, 171u, 181u, 187u, + 188u, 194u, 201u, 213u, 222u, 234u, + 236u, 244u, 254u, 263u, 265u }; bool isCharacterHit05[] = { false, true, true, true, true, false, false, true, true, true, true, false, false, true, true, true, true, false, @@ -509,7 +517,7 @@ int UtcDaliGetClosestCursorIndex(void) float visualX08[] = { 7.f }; float visualY08[] = { 12.f }; CharacterHitTest::Mode mode08[] = { CharacterHitTest::TAP }; - CharacterIndex logicalIndex08[] = { 1u }; + CharacterIndex logicalIndex08[] = { 2u }; bool isCharacterHit08[] = { true }; struct GetClosestCursorIndexData data[] = @@ -626,7 +634,7 @@ int UtcDaliGetCursorPosition(void) { tet_infoline(" UtcDaliGetCursorPosition"); - float visualX08[] = { 5.f }; + float visualX08[] = { 4.f }; float visualY08[] = { 0.f }; CharacterIndex logicalIndex08[] = { 1u }; @@ -681,14 +689,14 @@ int UtcDaliFindSelectionIndices(void) CharacterIndex endIndex03[] = { 11u }; CharacterIndex noHitText03[] = { 0u }; - float visualX04[] = { 132.f }; + float visualX04[] = { 131.f }; float visualY04[] = { 12.f }; bool found04[] = { true }; CharacterIndex startIndex04[] = { 12u }; CharacterIndex endIndex04[] = { 16u }; CharacterIndex noHitText04[] = { 0u }; - float visualX05[] = { 1.f }; + float visualX05[] = { 0.f }; float visualY05[] = { 12.f }; bool found05[] = { true }; CharacterIndex startIndex05[] = { 0 };