X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali%2Futc-Dali-PinchGestureDetector.cpp;h=72bcb9285e14bda7c3291ebcacbaf606725e3d97;hb=c5015fd94aa766b0c8aa652dbfc7ad3e24758199;hp=6842603bb17ed6624a0d3720d6f7b49988df37f6;hpb=b0f468ba41245cab977c308f7f34b106370a8771;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp index 6842603..72bcb92 100644 --- a/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp @@ -168,7 +168,7 @@ int UtcDaliPinchGestureDetectorNew(void) // Attach an actor and emit a touch event on the actor to ensure complete line coverage Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -229,7 +229,7 @@ int UtcDaliPinchGestureSignalReceptionNegative(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -271,7 +271,7 @@ int UtcDaliPinchGestureSignalReceptionDownMotionLeave(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -332,7 +332,7 @@ int UtcDaliPinchGestureSignalReceptionDownMotionUp(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -383,7 +383,7 @@ int UtcDaliPinchGestureSignalReceptionDetach(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -434,7 +434,7 @@ int UtcDaliPinchGestureSignalReceptionDetachWhilePinching(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -486,7 +486,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void) // Attach a temporary actor to stop detector being removed from PinchGestureProcessor when main actor // is destroyed. Actor tempActor = Actor::New(); - tempActor.SetSize(100.0f, 100.0f); + tempActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(tempActor); detector.Attach(tempActor); @@ -494,7 +494,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void) // Actor lifetime is scoped { Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -540,8 +540,8 @@ int UtcDaliPinchGestureSignalReceptionRotatedActor(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); - actor.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); + actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) ); Stage::GetCurrent().Add(actor); // Render and notify a couple of times @@ -567,7 +567,7 @@ int UtcDaliPinchGestureSignalReceptionRotatedActor(void) DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.screenCenterPoint, 0.01f, TEST_LOCATION); // Rotate actor again and render and notify - actor.SetOrientation(Dali::Degree(180.0f), Vector3::ZAXIS); + actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(180.0f), Vector3::ZAXIS) ); application.SendNotification(); application.Render(); @@ -583,7 +583,7 @@ int UtcDaliPinchGestureSignalReceptionRotatedActor(void) DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.screenCenterPoint, 0.01f, TEST_LOCATION); // Rotate actor again and render and notify - actor.SetOrientation(Dali::Degree(270.0f), Vector3::ZAXIS); + actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(270.0f), Vector3::ZAXIS) ); application.SendNotification(); application.Render(); @@ -605,7 +605,7 @@ int UtcDaliPinchGestureSignalReceptionChildHit(void) TestApplication application; Actor parent = Actor::New(); - parent.SetSize(100.0f, 100.0f); + parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(parent); @@ -613,10 +613,10 @@ int UtcDaliPinchGestureSignalReceptionChildHit(void) // Change rotation of child to be different from parent so that we can check if our local coordinate // conversion of the parent actor is correct. Actor child = Actor::New(); - child.SetSize(100.0f, 100.0f); + child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); - child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS); + child.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) ); parent.Add(child); TouchEventFunctor touchFunctor; @@ -669,13 +669,13 @@ int UtcDaliPinchGestureSignalReceptionAttachDetachMany(void) TestApplication application; Actor first = Actor::New(); - first.SetSize(100.0f, 100.0f); + first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(first); Actor second = Actor::New(); - second.SetSize(100.0f, 100.0f); - second.SetX(100.0f); + second.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); + second.SetProperty( Actor::Property::POSITION_X, 100.0f); second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(second); @@ -720,7 +720,7 @@ int UtcDaliPinchGestureSignalReceptionActorBecomesUntouchable(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -766,12 +766,12 @@ int UtcDaliPinchGestureSignalReceptionMultipleDetectorsOnActor(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); Actor actor2 = Actor::New(); - actor2.SetSize(100.0f, 100.0f); + actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); @@ -845,7 +845,7 @@ int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void) TestApplication application; Actor actor1 = Actor::New(); - actor1.SetSize(100.0f, 100.0f); + actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor1); SignalData data1; @@ -855,7 +855,7 @@ int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void) detector1.DetectedSignal().Connect(&application, functor1); Actor actor2 = Actor::New(); - actor2.SetSize(100.0f, 100.0f); + actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); Stage::GetCurrent().Add(actor2); @@ -882,7 +882,7 @@ int UtcDaliPinchGestureActorUnstaged(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -973,14 +973,14 @@ int UtcDaliPinchGestureActorStagedAndDestroyed(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); // Create and add a second actor so that GestureDetector destruction does not come into play. Actor dummyActor( Actor::New() ); - dummyActor.SetSize( 100.0f, 100.0f ); - dummyActor.SetPosition( 100.0f, 100.0f ); + dummyActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); + dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f )); dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(dummyActor); @@ -1065,7 +1065,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void) TestApplication application; Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); + actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add(actor); @@ -1078,7 +1078,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void) // Add a layer to overlap the actor Layer layer = Layer::New(); - layer.SetSize(100.0f, 100.0f); + layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); Stage::GetCurrent().Add( layer ); layer.RaiseToTop();