X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-internal%2Futc-Dali-VisualModel.cpp;h=df247e0066c97012536b6569a097d30639f00491;hp=fe6d4cb5c86f1b70b3c433119460b8e3ea607c31;hb=1a0dc2cc53708bbc32546da6031e996465544f51;hpb=e84f2b4052f5a042c6a08d02b87e771bac5ddf44 diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-VisualModel.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-VisualModel.cpp index fe6d4cb..df247e0 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-VisualModel.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-VisualModel.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include using namespace Dali; @@ -65,8 +65,8 @@ struct SetCharacterToGlyphData bool SetGlyphsPerCharacterTest( const SetGlyphsPerCharacterData& data ) { // 1) Create the model. - LogicalModelPtr logicalModel = LogicalModel::New(); - VisualModelPtr visualModel = VisualModel::New(); + ModelPtr textModel; + MetricsPtr metrics; Size textArea(100.f, 60.f); Size layoutSize; @@ -77,13 +77,18 @@ bool SetGlyphsPerCharacterTest( const SetGlyphsPerCharacterData& data ) fontDescriptions, options, layoutSize, - logicalModel, - visualModel ); + textModel, + metrics, + false ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; - // 2) Clear the model. Vector& charactersToGlyph = visualModel->mCharactersToGlyph; Vector& glyphsPerCharacter = visualModel->mGlyphsPerCharacter; + // 2) Clear the model. + GlyphIndex startGlyphIndex = 0u; if( 0u != charactersToGlyph.Count() ) { @@ -144,8 +149,8 @@ bool SetGlyphsPerCharacterTest( const SetGlyphsPerCharacterData& data ) bool SetCharacterToGlyphTest( const SetCharacterToGlyphData& data ) { // 1) Create the model. - LogicalModelPtr logicalModel = LogicalModel::New(); - VisualModelPtr visualModel = VisualModel::New(); + ModelPtr textModel; + MetricsPtr metrics; Size textArea(100.f, 60.f); Size layoutSize; @@ -156,13 +161,18 @@ bool SetCharacterToGlyphTest( const SetCharacterToGlyphData& data ) fontDescriptions, options, layoutSize, - logicalModel, - visualModel ); + textModel, + metrics, + false ); + + LogicalModelPtr logicalModel = textModel->mLogicalModel; + VisualModelPtr visualModel = textModel->mVisualModel; - // 2) Clear the model. Vector& charactersToGlyph = visualModel->mCharactersToGlyph; Vector& glyphsPerCharacter = visualModel->mGlyphsPerCharacter; + // 2) Clear the model. + GlyphIndex startGlyphIndex = 0u; if( 0u != charactersToGlyph.Count() ) { @@ -224,7 +234,6 @@ bool SetCharacterToGlyphTest( const SetCharacterToGlyphData& data ) int UtcDaliSetGlyphsPerCharacter(void) { - ToolkitTestApplication application; tet_infoline(" UtcDaliSetGlyphsPerCharacter"); Length glyphsPerCharacter02[] = { 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u }; @@ -291,6 +300,7 @@ int UtcDaliSetGlyphsPerCharacter(void) for( unsigned int index = 0u; index < numberOfTests; ++index ) { + ToolkitTestApplication application; if( !SetGlyphsPerCharacterTest( data[index] ) ) { tet_result(TET_FAIL); @@ -303,7 +313,6 @@ int UtcDaliSetGlyphsPerCharacter(void) int UtcDaliSetCharacterToGlyph(void) { - ToolkitTestApplication application; tet_infoline(" UtcDaliSetGlyphsPerCharacter"); GlyphIndex glyphIndices02[] = { 0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u, 10u }; @@ -368,6 +377,7 @@ int UtcDaliSetCharacterToGlyph(void) for( unsigned int index = 0u; index < numberOfTests; ++index ) { + ToolkitTestApplication application; if( !SetCharacterToGlyphTest( data[index] ) ) { tet_result(TET_FAIL);