projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Improved visual base property registration speed" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
automated-tests
/
src
/
dali-toolkit-internal
/
utc-Dali-LogicalModel.cpp
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
..
8b15ad3
100755
(executable)
--- 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) 20
16
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
21
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.
*
* 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.
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;
MetricsPtr metrics;
Size textArea(100.f, 60.f);
Size layoutSize;
@@
-117,10
+116,16
@@
bool CreateParagraphTest( const CreateParagraphData& data )
fontDescriptionRuns,
options,
layoutSize,
fontDescriptionRuns,
options,
layoutSize,
- logicalModel,
- visualModel,
+ textModel,
metrics,
metrics,
- false );
+ false,
+ LineWrap::WORD,
+ false,
+ Toolkit::DevelText::EllipsisPosition::END,
+ 0.f );
+
+ LogicalModelPtr logicalModel = textModel->mLogicalModel;
+ VisualModelPtr visualModel = textModel->mVisualModel;
// 2) Clear the paragraphs.
Vector<ParagraphRun>& paragraphs = logicalModel->mParagraphInfo;
// 2) Clear the paragraphs.
Vector<ParagraphRun>& paragraphs = logicalModel->mParagraphInfo;
@@
-165,8
+170,7
@@
bool CreateParagraphTest( const CreateParagraphData& data )
bool FindParagraphTest( const FindParagraphData& data )
{
// 1) Create the model.
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;
MetricsPtr metrics;
Size textArea(100.f, 60.f);
Size layoutSize;
@@
-178,10
+182,16
@@
bool FindParagraphTest( const FindParagraphData& data )
fontDescriptionRuns,
options,
layoutSize,
fontDescriptionRuns,
options,
layoutSize,
- logicalModel,
- visualModel,
+ textModel,
metrics,
metrics,
- false );
+ false,
+ LineWrap::WORD,
+ false,
+ Toolkit::DevelText::EllipsisPosition::END,
+ 0.f );
+
+ LogicalModelPtr logicalModel = textModel->mLogicalModel;
+ VisualModelPtr visualModel = textModel->mVisualModel;
// 2) Find the paragraphs.
Vector<ParagraphRunIndex> paragraphs;
// 2) Find the paragraphs.
Vector<ParagraphRunIndex> paragraphs;
@@
-214,8
+224,7
@@
bool FetchBidirectionalLineInfoTest( const FetchBidirectionalLineInfoData& data
{
std::cout << " testing : " << data.description << std::endl;
// Create the model.
{
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;
MetricsPtr metrics;
Size textArea( 100.f, 300.f );
Size layoutSize;
@@
-228,10
+237,16
@@
bool FetchBidirectionalLineInfoTest( const FetchBidirectionalLineInfoData& data
fontDescriptions,
options,
layoutSize,
fontDescriptions,
options,
layoutSize,
- logicalModel,
- visualModel,
+ textModel,
metrics,
metrics,
- false );
+ false,
+ LineWrap::WORD,
+ false,
+ Toolkit::DevelText::EllipsisPosition::END,
+ 0.f );
+
+ LogicalModelPtr logicalModel = textModel->mLogicalModel;
+ VisualModelPtr visualModel = textModel->mVisualModel;
for( unsigned int index = 0; index < data.numberOfTests; ++index )
{
for( unsigned int index = 0; index < data.numberOfTests; ++index )
{
@@
-260,8
+275,7
@@
bool GetLogicalCharacterIndexTest( const GetLogicalCharacterIndexData& data )
{
std::cout << " testing : " << data.description << std::endl;
// Create the model.
{
std::cout << " testing : " << data.description << std::endl;
// Create the model.
- LogicalModelPtr logicalModel;
- VisualModelPtr visualModel;
+ ModelPtr textModel;
MetricsPtr metrics;
Size layoutSize;
MetricsPtr metrics;
Size layoutSize;
@@
-273,10
+287,16
@@
bool GetLogicalCharacterIndexTest( const GetLogicalCharacterIndexData& data )
fontDescriptions,
options,
layoutSize,
fontDescriptions,
options,
layoutSize,
- logicalModel,
- visualModel,
+ textModel,
metrics,
metrics,
- false );
+ false,
+ LineWrap::WORD,
+ false,
+ Toolkit::DevelText::EllipsisPosition::END,
+ 0.f );
+
+ LogicalModelPtr logicalModel = textModel->mLogicalModel;
+ VisualModelPtr visualModel = textModel->mVisualModel;
for( unsigned int index = 0u; index < data.numberOfIndices; ++index )
{
for( unsigned int index = 0u; index < data.numberOfIndices; ++index )
{
@@
-315,8
+335,7
@@
bool GetLogicalCursorIndexTest( const GetLogicalCursorIndexData& data )
fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHebrewRegular.ttf" );
// Create the model.
fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHebrewRegular.ttf" );
// Create the model.
- LogicalModelPtr logicalModel;
- VisualModelPtr visualModel;
+ ModelPtr textModel;
MetricsPtr metrics;
Size layoutSize;
MetricsPtr metrics;
Size layoutSize;
@@
-335,10
+354,16
@@
bool GetLogicalCursorIndexTest( const GetLogicalCursorIndexData& data )
fontDescriptionRuns,
options,
layoutSize,
fontDescriptionRuns,
options,
layoutSize,
- logicalModel,
- visualModel,
+ textModel,
metrics,
metrics,
- false );
+ false,
+ LineWrap::WORD,
+ false,
+ Toolkit::DevelText::EllipsisPosition::END,
+ 0.f );
+
+ LogicalModelPtr logicalModel = textModel->mLogicalModel;
+ VisualModelPtr visualModel = textModel->mVisualModel;
for( unsigned int index = 0u; index < data.numberOfIndices; ++index )
{
for( unsigned int index = 0u; index < data.numberOfIndices; ++index )
{