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=93a644baeef5a901328c1039159c9393d5ed4c3c;hp=7b7bc0df915d6544aec07fe8fadcf1d49269eda4;hb=5e351965bad7e1de2e94027548b022bac692603c;hpb=48d13d45cb7f363d3cf8da048ce6cef074c55060 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index 7b7bc0d..93a644b 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -476,6 +476,13 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) label.SetProperty( TextLabel::Property::ELLIPSIS, true ); DALI_TEST_CHECK( label.GetProperty( TextLabel::Property::ELLIPSIS ) ); + // Check the layout direction property + label.SetProperty( Actor::Property::LAYOUT_DIRECTION, LayoutDirection::RIGHT_TO_LEFT ); + DALI_TEST_EQUALS( label.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::RIGHT_TO_LEFT ), TEST_LOCATION ); + + application.SendNotification(); + application.Render(); + END_TEST; } @@ -623,6 +630,12 @@ int UtcDaliToolkitTextlabelScrollingP(void) // Render some text with the shared atlas backend labelImmediate.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true ); labelFinished.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true ); + + labelImmediate.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, false ); + labelFinished.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, false ); + + labelImmediate.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true ); + labelFinished.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true ); application.SendNotification(); application.Render(); @@ -1112,3 +1125,32 @@ int UtcDaliToolkitTextlabelTextStyle01(void) END_TEST; } + +int UtcDaliToolkitTextlabelMultiline(void) +{ + ToolkitTestApplication application; + tet_infoline(" UtcDaliToolkitTextlabelMultiline"); + + TextLabel label = TextLabel::New(); + label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world Hello world Hello world Hello world Hello world" ); + label.SetProperty( TextLabel::Property::POINT_SIZE, 20 ); + label.SetProperty( TextLabel::Property::MULTI_LINE, false ); + Stage::GetCurrent().Add( label ); + + application.SendNotification(); + application.Render(); + + int lineCount = label.GetProperty( TextLabel::Property::LINE_COUNT ); + DALI_TEST_EQUALS( lineCount, 1, TEST_LOCATION ); + + label.SetProperty( TextLabel::Property::MULTI_LINE, true ); + + application.SendNotification(); + application.Render(); + + lineCount = label.GetProperty( TextLabel::Property::LINE_COUNT ); + DALI_TEST_EQUALS( true, (lineCount > 1) , TEST_LOCATION ); + + + END_TEST; +}