X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-internal%2Futc-Dali-LogicalModel.cpp;h=8515172b2dbf42b979db9f719a2b811d3758e792;hb=6ae6f36998b3be4efa1114e2df856e51628bf812;hp=67c7e243865af1b28cde2afd9ec83ea7b2762ea1;hpb=81529cb3b54f998306def4db0ba3f5f5a65c0c30;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-LogicalModel.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-LogicalModel.cpp index 67c7e24..8515172 100755 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-LogicalModel.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-LogicalModel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -104,8 +104,7 @@ struct GetLogicalCursorIndexData bool CreateParagraphTest( const CreateParagraphData& data ) { // 1) Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size textArea(100.f, 60.f); Size layoutSize; @@ -117,10 +116,13 @@ bool CreateParagraphTest( const CreateParagraphData& data ) fontDescriptionRuns, options, layoutSize, - logicalModel, - visualModel, + textModel, metrics, - false ); + false, + LineWrap::WORD ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; // 2) Clear the paragraphs. Vector& paragraphs = logicalModel->mParagraphInfo; @@ -165,8 +167,7 @@ bool CreateParagraphTest( const CreateParagraphData& data ) bool FindParagraphTest( const FindParagraphData& data ) { // 1) Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size textArea(100.f, 60.f); Size layoutSize; @@ -178,10 +179,13 @@ bool FindParagraphTest( const FindParagraphData& data ) fontDescriptionRuns, options, layoutSize, - logicalModel, - visualModel, + textModel, metrics, - false ); + false, + LineWrap::WORD ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; // 2) Find the paragraphs. Vector paragraphs; @@ -214,8 +218,7 @@ bool FetchBidirectionalLineInfoTest( const FetchBidirectionalLineInfoData& data { std::cout << " testing : " << data.description << std::endl; // Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size textArea( 100.f, 300.f ); Size layoutSize; @@ -228,10 +231,13 @@ bool FetchBidirectionalLineInfoTest( const FetchBidirectionalLineInfoData& data fontDescriptions, options, layoutSize, - logicalModel, - visualModel, + textModel, metrics, - false ); + false, + LineWrap::WORD ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; for( unsigned int index = 0; index < data.numberOfTests; ++index ) { @@ -260,8 +266,7 @@ bool GetLogicalCharacterIndexTest( const GetLogicalCharacterIndexData& data ) { std::cout << " testing : " << data.description << std::endl; // Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size layoutSize; @@ -273,10 +278,13 @@ bool GetLogicalCharacterIndexTest( const GetLogicalCharacterIndexData& data ) fontDescriptions, options, layoutSize, - logicalModel, - visualModel, + textModel, metrics, - false ); + false, + LineWrap::WORD ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; for( unsigned int index = 0u; index < data.numberOfIndices; ++index ) { @@ -315,8 +323,7 @@ bool GetLogicalCursorIndexTest( const GetLogicalCursorIndexData& data ) fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHebrewRegular.ttf" ); // Create the model. - LogicalModelPtr logicalModel; - VisualModelPtr visualModel; + ModelPtr textModel; MetricsPtr metrics; Size layoutSize; @@ -335,10 +342,13 @@ bool GetLogicalCursorIndexTest( const GetLogicalCursorIndexData& data ) fontDescriptionRuns, options, layoutSize, - logicalModel, - visualModel, + textModel, metrics, - false ); + false, + LineWrap::WORD ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; for( unsigned int index = 0u; index < data.numberOfIndices; ++index ) {