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-ControlImpl.cpp;h=7eb5f48a1c9d0f486b8eca2aadaee9c120d1c48e;hp=23b0a94eab770ba847fa4822650f638708d1468b;hb=f3da11c2818c6d17706fbb2417f21b602b3190f5;hpb=fd1a47af0ac56d63622dcef32fade5c3b90957d0 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp index 23b0a94..7eb5f48 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp @@ -199,17 +199,17 @@ int UtcDaliControlImplDisableGestureDetector(void) TapGestureDetector tap = dummyImpl.GetTapGestureDetector(); LongPressGestureDetector longPress = dummyImpl.GetLongPressGestureDetector(); - DALI_TEST_EQUALS( pinch.GetAttachedActors().empty(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( pan.GetAttachedActors().empty(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( tap.GetAttachedActors().empty(), false, TEST_LOCATION ); - DALI_TEST_EQUALS( longPress.GetAttachedActors().empty(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( 0 == pinch.GetAttachedActorCount(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( 0 == pan.GetAttachedActorCount(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( 0 == tap.GetAttachedActorCount(), false, TEST_LOCATION ); + DALI_TEST_EQUALS( 0 == longPress.GetAttachedActorCount(), false, TEST_LOCATION ); dummyImpl.DisableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) ); - DALI_TEST_EQUALS( pinch.GetAttachedActors().empty(), true, TEST_LOCATION ); - DALI_TEST_EQUALS( pan.GetAttachedActors().empty(), true, TEST_LOCATION ); - DALI_TEST_EQUALS( tap.GetAttachedActors().empty(), true, TEST_LOCATION ); - DALI_TEST_EQUALS( longPress.GetAttachedActors().empty(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( 0 == pinch.GetAttachedActorCount(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( 0 == pan.GetAttachedActorCount(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( 0 == tap.GetAttachedActorCount(), true, TEST_LOCATION ); + DALI_TEST_EQUALS( 0 == longPress.GetAttachedActorCount(), true, TEST_LOCATION ); } END_TEST; } @@ -354,7 +354,7 @@ int UtcDaliControlImplChildAddAndRemove(void) DALI_TEST_EQUALS( dummyImpl.childAddCalled, false, TEST_LOCATION ); DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION ); - Actor actor = RenderableActor::New(); + Actor actor = Actor::New(); dummy.Add(actor); DALI_TEST_EQUALS( dummyImpl.childAddCalled, true, TEST_LOCATION ); DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION ); @@ -382,7 +382,7 @@ int UtcDaliControlImplChildAddAndRemove(void) application.SendNotification(); DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION ); - Actor actor = RenderableActor::New(); + Actor actor = Actor::New(); dummy.Add(actor); DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION ); @@ -867,17 +867,11 @@ int UtcDaliControlImplOnStyleChangeN(void) Control dummy = Control::New(); Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy ); - // test that style manager is being used, passing an empty handle throws exception - try - { - Dali::Toolkit::StyleManager styleManager; - controlImpl.OnStyleChange( styleManager, StyleChange::THEME_CHANGE ); - tet_result(TET_FAIL); - } - catch (DaliException &exception) - { - tet_result(TET_PASS); - } + // test that style manager is being used, passing an empty handle does nothing but does not crash either + Dali::Toolkit::StyleManager styleManager; + controlImpl.OnStyleChange( styleManager, StyleChange::THEME_CHANGE ); + // no crash so test passes + tet_result(TET_PASS); END_TEST; } @@ -921,8 +915,8 @@ int UtcDaliControlImplOnAccessibilityActivatedP(void) BaseHandle handle = type.CreateInstance(); DALI_TEST_CHECK( handle ); - std::vector attributes; - DALI_TEST_EQUALS( false, handle.DoAction("control-activated", attributes), TEST_LOCATION ); + Property::Map attributes; + DALI_TEST_EQUALS( false, handle.DoAction("accessibilityActivated", attributes), TEST_LOCATION ); END_TEST; } @@ -934,7 +928,7 @@ int UtcDaliControlImplGetNextKeyboardFocusableActorP(void) Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy ); Actor currentFocusedActor; - Actor result = controlImpl.GetNextKeyboardFocusableActor( currentFocusedActor, Control::Left, false ); + Actor result = controlImpl.GetNextKeyboardFocusableActor( currentFocusedActor, Control::KeyboardFocus::LEFT, false ); DALI_TEST_EQUALS( result, currentFocusedActor, TEST_LOCATION );