X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-TextLabel.cpp;h=493655dbfd6ddc0b7a645d303b8cd1036a2a41d8;hp=67dc221b4e52891fefde9c917a2ed33eb83c6791;hb=679dd19ad581013971018b16212ef551b5c6cd31;hpb=1b032e3f72c144d2da593a1c20d15041a3de00a3 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index 67dc221..493655d 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -67,7 +67,6 @@ const char* const PROPERTY_NAME_PIXEL_SIZE = "pixelSize"; const char* const PROPERTY_NAME_ELLIPSIS = "ellipsis"; const char* const PROPERTY_NAME_AUTO_SCROLL_LOOP_DELAY = "autoScrollLoopDelay"; -const int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND; const std::string DEFAULT_FONT_DIR( "/resources/fonts" ); const unsigned int EMOJI_FONT_SIZE = 3840u; // 60 * 64 @@ -373,9 +372,9 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) Property::Map underlineMapSet; Property::Map underlineMapGet; - underlineMapSet.Insert( "enable", "false" ); - underlineMapSet.Insert( "color", "blue" ); - underlineMapSet.Insert( "height", "0" ); + underlineMapSet.Insert( "enable", false ); + underlineMapSet.Insert( "color", Color::BLUE ); + underlineMapSet.Insert( "height", 0 ); underlineMapGet = label.GetProperty( TextLabel::Property::UNDERLINE ); DALI_TEST_EQUALS( underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION ); @@ -466,9 +465,9 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) // Check the underline property underlineMapSet.Clear(); - underlineMapSet.Insert( "enable", "true" ); - underlineMapSet.Insert( "color", "red" ); - underlineMapSet.Insert( "height", "1" ); + underlineMapSet.Insert( "enable", true ); + underlineMapSet.Insert( "color", Color::RED ); + underlineMapSet.Insert( "height", 1 ); label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet ); @@ -480,9 +479,9 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineMapSet ), true, TEST_LOCATION ); underlineMapSet.Clear(); - underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::ENABLE, "true" ); - underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::COLOR, "green" ); - underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::HEIGHT, "2" ); + underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::ENABLE, true ); + underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::COLOR, Color::GREEN ); + underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::HEIGHT, 2 ); label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet ); @@ -497,9 +496,9 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) underlineMapSet.Clear(); Property::Map underlineDisabledMapGet; - underlineDisabledMapGet.Insert( "enable", "false" ); - underlineDisabledMapGet.Insert( "color", "green" ); - underlineDisabledMapGet.Insert( "height", "2" ); + underlineDisabledMapGet.Insert( "enable", false ); + underlineDisabledMapGet.Insert( "color", Color::GREEN ); + underlineDisabledMapGet.Insert( "height", 2 ); label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet ); @@ -647,8 +646,8 @@ int UtcDaliToolkitTextlabelAtlasRenderP(void) label.SetProperty( TextLabel::Property::MULTI_LINE, true ); Property::Map underlineMap; - underlineMap.Insert( "enable", "true" ); - underlineMap.Insert( "color", "red" ); + underlineMap.Insert( "enable", true ); + underlineMap.Insert( "color", Color::RED ); label.SetProperty( TextLabel::Property::UNDERLINE, underlineMap ); Property::Map shadowMap; @@ -1174,7 +1173,7 @@ int UtcDaliToolkitTextlabelTextWrapMode(void) application.Render(); lineCount = label.GetProperty( TextLabel::Property::LINE_COUNT ); - DALI_TEST_EQUALS( lineCount, 4, TEST_LOCATION ); + DALI_TEST_EQUALS( lineCount, 2, TEST_LOCATION ); label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, "CHARACTER" ); DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::CHARACTER ), TEST_LOCATION ); @@ -1189,7 +1188,7 @@ int UtcDaliToolkitTextlabelTextWrapMode(void) application.Render(); lineCount = label.GetProperty( TextLabel::Property::LINE_COUNT ); - DALI_TEST_EQUALS( lineCount, 4, TEST_LOCATION ); + DALI_TEST_EQUALS( lineCount, 2, TEST_LOCATION ); label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, Text::LineWrap::CHARACTER ); DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::CHARACTER ), TEST_LOCATION ); @@ -1198,7 +1197,7 @@ int UtcDaliToolkitTextlabelTextWrapMode(void) application.Render(); lineCount = label.GetProperty( TextLabel::Property::LINE_COUNT ); - DALI_TEST_EQUALS( lineCount, 3, TEST_LOCATION ); + DALI_TEST_EQUALS( lineCount, 2, TEST_LOCATION ); tet_infoline( "Ensure invalid string does not change wrapping mode" ); label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, "InvalidWrapMode" );