X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali%2Futc-Dali-Animation.cpp;h=2a46bf595582649b7436f7d246922dbccad78e3f;hb=462cbee2270984cdca45488f3733d664dcf49187;hp=fec88e84024a4e82f31f7051861fe3b371899768;hpb=8feba68625b5a951f16191cdcc0daeeb12bd4f4c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/automated-tests/src/dali/utc-Dali-Animation.cpp b/automated-tests/src/dali/utc-Dali-Animation.cpp index fec88e8..2a46bf5 100644 --- a/automated-tests/src/dali/utc-Dali-Animation.cpp +++ b/automated-tests/src/dali/utc-Dali-Animation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ #include #include +#include +#include #include using std::max; @@ -1189,10 +1191,12 @@ int UtcDaliAnimationGetCurrentProgressP(void) END_TEST; } -int UtcDaliAnimationSetSpeedFactorP(void) +int UtcDaliAnimationSetSpeedFactorP1(void) { TestApplication application; + tet_printf("Testing that setting a speed factor of 2 takes half the time\n"); + Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); @@ -1246,14 +1250,38 @@ int UtcDaliAnimationSetSpeedFactorP(void) application.Render(0); DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); - finishCheck.Reset(); + END_TEST; +} + +int UtcDaliAnimationSetSpeedFactorP2(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + + // Build the animation + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); + + const Vector3 initialPosition(0.0f, 0.0f, 0.0f); + const Vector3 targetPosition(100.0f, 100.0f, 100.0f); + + KeyFrames keyframes = KeyFrames::New(); + keyframes.Add( 0.0f, initialPosition); + keyframes.Add( 1.0f, targetPosition ); + animation.AnimateBetween( Property(actor, Actor::Property::POSITION), keyframes, AlphaFunction::LINEAR); - //Test -1 speed factor. Animation will play in reverse at normal speed + tet_printf("Test -1 speed factor. Animation will play in reverse at normal speed\n"); animation.SetSpeedFactor( -1.0f ); // Start the animation animation.Play(); + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); + application.SendNotification(); application.Render(static_cast(durationSeconds*200.0f)/* 80% progress */); @@ -1296,8 +1324,33 @@ int UtcDaliAnimationSetSpeedFactorP(void) application.Render(0); DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); - //Test change speed factor on the fly - finishCheck.Reset(); + END_TEST; +} + +int UtcDaliAnimationSetSpeedFactorP3(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + + // Build the animation + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); + + const Vector3 initialPosition(0.0f, 0.0f, 0.0f); + const Vector3 targetPosition(100.0f, 100.0f, 100.0f); + + KeyFrames keyframes = KeyFrames::New(); + keyframes.Add( 0.0f, initialPosition); + keyframes.Add( 1.0f, targetPosition ); + animation.AnimateBetween( Property(actor, Actor::Property::POSITION), keyframes, AlphaFunction::LINEAR); + + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); + + tet_printf("Test half speed factor. Animation will take twice the duration\n"); //Set speed to be half of normal speed animation.SetSpeedFactor( 0.5f ); @@ -1327,176 +1380,609 @@ int UtcDaliAnimationSetSpeedFactorP(void) finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.3f), TEST_LOCATION ); - //Change speed factor while animation still playing. - animation.SetSpeedFactor(-1.0f); application.SendNotification(); - application.Render(static_cast(durationSeconds*200.0f)/* 10% progress */); + application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION ); - application.Render(static_cast(durationSeconds*100.0f) + 1u/*just beyond the animation duration*/); + application.Render(static_cast(durationSeconds*1200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); END_TEST; } -int UtcDaliAnimationGetSpeedFactorP(void) -{ - TestApplication application; - - Animation animation = Animation::New(1.0f); - animation.SetSpeedFactor(0.5f); - DALI_TEST_EQUALS(animation.GetSpeedFactor(), 0.5f, TEST_LOCATION); - - animation.SetSpeedFactor(-2.5f); - DALI_TEST_EQUALS(animation.GetSpeedFactor(), -2.5f, TEST_LOCATION); - END_TEST; -} -int UtcDaliAnimationSetPlayRangeP(void) +int UtcDaliAnimationSetSpeedFactorP4(void) { TestApplication application; Actor actor = Actor::New(); - Stage::GetCurrent().Add( actor ); + Stage::GetCurrent().Add(actor); // Build the animation - float durationSeconds( 1.0f ); - Animation animation = Animation::New( durationSeconds ); + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); - bool signalReceived( false ); - AnimationFinishCheck finishCheck( signalReceived ); - animation.FinishedSignal().Connect( &application, finishCheck ); - application.SendNotification(); + const Vector3 initialPosition(0.0f, 0.0f, 0.0f); + const Vector3 targetPosition(100.0f, 100.0f, 100.0f); - // Set range between 0.4 and 0.8 - animation.SetPlayRange( Vector2( 0.4f, 0.9f ) ); - application.SendNotification(); - DALI_TEST_EQUALS( Vector2( 0.4f, 0.9f ), animation.GetPlayRange(), TEST_LOCATION ); + KeyFrames keyframes = KeyFrames::New(); + keyframes.Add( 0.0f, initialPosition); + keyframes.Add( 1.0f, targetPosition ); + animation.AnimateBetween( Property(actor, Actor::Property::POSITION), keyframes, AlphaFunction::LINEAR); - Vector3 targetPosition( 100.0f, 100.0f, 100.0f ); - animation.AnimateTo( Property( actor, Actor::Property::POSITION ), targetPosition, AlphaFunction::LINEAR ); + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); - // Start the animation from 40% progress + tet_printf("Test half speed factor. Animation will take twice the duration\n"); + + tet_printf("Set speed to be half of normal speed\n"); + tet_printf("SetSpeedFactor(0.5f)\n"); + animation.SetSpeedFactor( 0.5f ); + + // Start the animation animation.Play(); application.SendNotification(); - application.Render( static_cast< unsigned int >( durationSeconds * 200.0f )/* 60% progress */ ); + application.Render(static_cast(durationSeconds*200.0f)/* 10% progress */); // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.6f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), TEST_LOCATION ); + + application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); + // We didn't expect the animation to finish yet application.SendNotification(); - application.Render( static_cast< unsigned int >( durationSeconds * 200.0f )/* 80% progress */ ); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + + application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); + // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.8f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.3f), TEST_LOCATION ); + + tet_printf("Reverse direction of animation whilst playing\n"); + tet_printf("SetSpeedFactor(-0.5f)\n"); + animation.SetSpeedFactor(-0.5f); application.SendNotification(); - application.Render( static_cast< unsigned int >( durationSeconds*100.0f ) + 1u/*just beyond the animation duration*/ ); + application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + + application.Render(static_cast(durationSeconds*200.0f)/* 10% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), 0.0001, TEST_LOCATION ); + + application.Render(static_cast(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/); // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.9f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION ); + + // Check that nothing has changed after a couple of buffer swaps + application.Render(0); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + application.Render(0); + DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION ); END_TEST; } -int UtcDaliAnimationSetPlayRangeN(void) +int UtcDaliAnimationSetSpeedFactorAndRange(void) { TestApplication application; - Actor actor = Actor::New(); - Stage::GetCurrent().Add(actor); + const unsigned int NUM_FRAMES(15); + + struct TestData + { + float startTime; + float endTime; + float startX; + float endX; + float expected[NUM_FRAMES]; + }; + + TestData testData[] = { + // ACTOR 0 + /*0.0f, 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f */ + /* |----------PlayRange---------------| */ + /* | reverse */ + { 0.0f, 1.0f, // TimePeriod + 0.0f, 100.0f, // POS + {/**/ 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, /* Loop */ + /**/ 30.0f, 40.0f, 50.0f, 60.0f, /* Reverse direction */ + /**/ 50.0f, + /**/ 40.0f, + /**/ 30.0f, + /**/ 70.0f, + /**/ 60.0f, + /**/ 50.0f, + /**/ + } + }, + + // ACTOR 1 - Across start of range + /*0.0f, 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f */ + /* |----------PlayRange---------------| */ + /* | reverse */ + { 0.2f, 0.5f, // TimePeriod + 20.0f, 50.0f, // POS + {/**/ 30.0f, 40.0f, 50.0f, 50.0f, 50.0f, /* Loop */ + /**/ 30.0f, 40.0f, 50.0f, 50.0f, /* Reverse direction @ frame #9 */ + /**/ 50.0f, + /**/ 40.0f, + /**/ 30.0f, + /**/ 50.0f, + /**/ 50.0f, + /**/ 50.0f + } + }, + + // ACTOR 2 - Across end of range + /*0.0f, 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f */ + /* |----------PlayRange---------------| */ + /* | reverse */ + {/**/ 0.5f, 0.9f, // TimePeriod + /**/ 50.0f, 90.0f, // POS + { /**/ 50.0f, 50.0f, 50.0f, 60.0f, 70.0f, /* Loop */ + /**/ 50.0f, 50.0f, 50.0f, 60.0f,/* Reverse direction @ frame #9 */ + /**/ 50.0f, + /**/ 50.0f, + /**/ 50.0f, 70.0f, + /**/ 60.0f, + /**/ 50.0f, + } + }, + + // ACTOR 3 - Before beginning of range + /*0.0f, 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f */ + /* |----------PlayRange---------------| */ + /* | reverse */ + {/**/ 0.1f, 0.25f, // TimePeriod + /**/ 10.0f, 25.0f, // POS + { /**/ + /**/ 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f, 25.0f + /**/ + } + }, + + // ACTOR 4 - After end of range + /*0.0f, 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f */ + /* |----------PlayRange---------------| */ + /* | reverse */ + {/**/ 0.85f, 1.0f, // TimePeriod + /**/ 85.0f, 100.0f, // POS + { /**/ + /**/ 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f, 85.0f + /**/ + } + }, + // Actor 5 - Middle of range + /*0.0f, 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f */ + /* |----------PlayRange---------------| */ + /* | reverse */ + {/**/ 0.4f, 0.65f, // Time Period + /**/ 40.0f, 65.0f, // Position + { /**/ 40.0f, 40.0f, 50.0f, 60.0f, 65.0f, + /**/ 40.0f, 40.0f, 50.0f, 60.0f, // Reverse + /**/ 50.0f, + /**/ 40.0f, + /**/ 40.0f, + /**/ 65.0f, + /**/ 60.0f, + /**/ 50.0f, + } + } + }; + + const size_t NUM_ENTRIES(sizeof(testData)/sizeof(TestData)); // Build the animation - Animation animation = Animation::New(0); - application.SendNotification(); + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); - //PlayRange out of bounds - animation.SetPlayRange( Vector2(-1.0f,1.0f) ); - application.SendNotification(); - DALI_TEST_EQUALS( Vector2(0.0f,1.0f), animation.GetPlayRange(), TEST_LOCATION ); - animation.SetPlayRange( Vector2(0.0f,2.0f) ); - application.SendNotification(); - DALI_TEST_EQUALS( Vector2(0.0f,1.0f), animation.GetPlayRange(), TEST_LOCATION ); + std::vector actors; - //If playRange is not in the correct order it has to be ordered - animation.SetPlayRange( Vector2(0.8f,0.2f) ); + for( unsigned int actorIndex = 0; actorIndex < NUM_ENTRIES; ++actorIndex ) + { + Actor actor = Actor::New(); + actor.SetPosition( Vector3( testData[actorIndex].startX, 0, 0 ) ); + actors.push_back(actor); + Stage::GetCurrent().Add(actor); + + if( actorIndex == 0 || actorIndex == NUM_ENTRIES-1 ) + { + KeyFrames keyframes = KeyFrames::New(); + keyframes.Add( testData[actorIndex].startTime, Vector3(testData[actorIndex].startX, 0, 0)); + keyframes.Add( testData[actorIndex].endTime, Vector3(testData[actorIndex].endX, 0, 0)); + animation.AnimateBetween( Property(actor, Actor::Property::POSITION), keyframes, AlphaFunction::LINEAR); + } + else + { + animation.AnimateTo( Property(actor, Actor::Property::POSITION), Vector3( testData[actorIndex].endX, 0, 0 ), TimePeriod( testData[actorIndex].startTime, testData[actorIndex].endTime - testData[actorIndex].startTime) ); + } + } + + tet_printf("Test half speed factor. Animation will take twice the duration\n"); + tet_printf("Set play range to be 0.3 - 0.8 of the duration\n"); + tet_printf("SetSpeedFactor(0.5f)\n"); + animation.SetSpeedFactor( 0.5f ); + animation.SetPlayRange( Vector2(0.3f, 0.8f) ); + animation.SetLooping(true); + + // Start the animation + animation.Play(); application.SendNotification(); - DALI_TEST_EQUALS( Vector2(0.2f,0.8f), animation.GetPlayRange(), TEST_LOCATION ); + application.Render(0); // Frame 0 tests initial values + + for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame ) + { + unsigned int actorIndex = 0u; + for( actorIndex = 0u; actorIndex < NUM_ENTRIES; ++actorIndex ) + { + DALI_TEST_EQUALS( actors[actorIndex].GetCurrentPosition().x, testData[actorIndex].expected[frame], 0.001, TEST_LOCATION ); + if( ! Equals(actors[actorIndex].GetCurrentPosition().x, testData[actorIndex].expected[frame]) ) + { + tet_printf("Failed at frame %u, actorIndex %u\n", frame, actorIndex ); + } + } + + if( frame == 8 ) + { + tet_printf("Reverse direction of animation whilst playing after frame 8\n"); + tet_printf("SetSpeedFactor(-0.5f)\n"); + animation.SetSpeedFactor(-0.5f); + application.SendNotification(); + } + application.Render(200); // 200 ms at half speed corresponds to 0.1 s + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + } END_TEST; } -int UtcDaliAnimationGetPlayRangeP(void) +int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount01(void) { TestApplication application; - Actor actor = Actor::New(); - Stage::GetCurrent().Add( actor ); + const unsigned int NUM_FRAMES(15); + + struct TestData + { + float startTime; + float endTime; + float startX; + float endX; + float expected[NUM_FRAMES]; + }; + + TestData testData = + // ACTOR 0 + /*0.0f, 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f */ + /* |----------PlayRange---------------| */ + { 0.0f, 1.0f, // TimePeriod + 0.0f, 100.0f, // POS + {/**/ 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, /* Loop */ + /**/ 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, + /**/ 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, + /**/ + } + }; + // Build the animation - Animation animation = Animation::New( 1.0f ); + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); + + std::vector actors; + + Actor actor = Actor::New(); + actor.SetPosition( Vector3( testData.startX, 0, 0 ) ); + actors.push_back(actor); + Stage::GetCurrent().Add(actor); + + KeyFrames keyframes = KeyFrames::New(); + keyframes.Add( testData.startTime, Vector3(testData.startX, 0, 0)); + keyframes.Add( testData.endTime, Vector3(testData.endX, 0, 0)); + animation.AnimateBetween( Property(actor, Actor::Property::POSITION), keyframes, AlphaFunction::LINEAR); + + tet_printf("Test half speed factor. Animation will take twice the duration\n"); + tet_printf("Set play range to be 0.3 - 0.8 of the duration\n"); + tet_printf("SetSpeedFactor(0.5f)\n"); + tet_printf("SetLoopCount(3)\n"); + animation.SetSpeedFactor( 0.5f ); + animation.SetPlayRange( Vector2(0.3f, 0.8f) ); + animation.SetLoopCount(3); + + // Start the animation + animation.Play(); application.SendNotification(); + application.Render(0); // Frame 0 tests initial values - //If PlayRange not specified it should be 0.0-1.0 by default - DALI_TEST_EQUALS( Vector2( 0.0f,1.0f ), animation.GetPlayRange(), TEST_LOCATION ); + for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame ) + { + DALI_TEST_EQUALS( actor.GetCurrentPosition().x, testData.expected[frame], 0.001, TEST_LOCATION ); - // Set range between 0.4 and 0.8 - animation.SetPlayRange( Vector2( 0.4f, 0.8f ) ); + application.Render(200); // 200 ms at half speed corresponds to 0.1 s + + if( frame < NUM_FRAMES-1 ) + { + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + } + } + + // We did expect the animation to finish application.SendNotification(); - DALI_TEST_EQUALS( Vector2( 0.4f, 0.8f ), animation.GetPlayRange(), TEST_LOCATION ); + finishCheck.CheckSignalReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 80.0f, 0.001, TEST_LOCATION ); END_TEST; } -int UtcDaliAnimationPlayP(void) +int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount02(void) { TestApplication application; - Actor actor = Actor::New(); - Stage::GetCurrent().Add(actor); + const unsigned int NUM_FRAMES(15); + + struct TestData + { + float startTime; + float endTime; + float startX; + float endX; + float expected[NUM_FRAMES]; + }; + + TestData testData = + // ACTOR 0 + /*0.0f, 0.1f 0.2f 0.3f 0.4f 0.5f 0.6f 0.7f 0.8f 0.9f 1.0f */ + /* |----------PlayRange---------------| */ + { 0.0f, 1.0f, // TimePeriod + 0.0f, 100.0f, // POS + {/**/ 80.0f, 70.0f, 60.0f, 50.0f, 40.0f, + /**/ 80.0f, 70.0f, 60.0f, 50.0f, 40.0f, + /**/ 80.0f, 70.0f, 60.0f, 50.0f, 40.0f, + } + }; + // Build the animation float durationSeconds(1.0f); Animation animation = Animation::New(durationSeconds); - Vector3 targetPosition(100.0f, 100.0f, 100.0f); - animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR); - - // Start the animation - animation.Play(); - bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); - application.SendNotification(); - application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); + std::vector actors; - // We didn't expect the animation to finish yet - application.SendNotification(); - finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + Actor actor = Actor::New(); + actor.SetPosition( Vector3( testData.startX, 0, 0 ) ); + actors.push_back(actor); + Stage::GetCurrent().Add(actor); - animation.Play(); // Test that calling play has no effect, when animation is already playing - application.SendNotification(); - application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); + KeyFrames keyframes = KeyFrames::New(); + keyframes.Add( testData.startTime, Vector3(testData.startX, 0, 0)); + keyframes.Add( testData.endTime, Vector3(testData.endX, 0, 0)); + animation.AnimateBetween( Property(actor, Actor::Property::POSITION), keyframes, AlphaFunction::LINEAR); + + tet_printf("Test reverse half speed factor. Animation will take twice the duration\n"); + tet_printf("Set play range to be 0.3 - 0.8 of the duration\n"); + tet_printf("SetSpeedFactor(-0.5f)\n"); + tet_printf("SetLoopCount(3)\n"); + animation.SetSpeedFactor( -0.5f ); + animation.SetPlayRange( Vector2(0.3f, 0.8f) ); + animation.SetLoopCount(3); + + // Start the animation + animation.Play(); + application.SendNotification(); + application.Render(0); // Frame 0 tests initial values + + for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame ) + { + DALI_TEST_EQUALS( actor.GetCurrentPosition().x, testData.expected[frame], 0.001, TEST_LOCATION ); + + application.Render(200); // 200 ms at half speed corresponds to 0.1 s + + if( frame < NUM_FRAMES-1 ) + { + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + } + } + + // We did expect the animation to finish + application.SendNotification(); + finishCheck.CheckSignalReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 30.0f, 0.001, TEST_LOCATION ); + + END_TEST; +} + + +int UtcDaliAnimationGetSpeedFactorP(void) +{ + TestApplication application; + + Animation animation = Animation::New(1.0f); + animation.SetSpeedFactor(0.5f); + DALI_TEST_EQUALS(animation.GetSpeedFactor(), 0.5f, TEST_LOCATION); + + animation.SetSpeedFactor(-2.5f); + DALI_TEST_EQUALS(animation.GetSpeedFactor(), -2.5f, TEST_LOCATION); + END_TEST; +} + +int UtcDaliAnimationSetPlayRangeP(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add( actor ); + + // Build the animation + float durationSeconds( 1.0f ); + Animation animation = Animation::New( durationSeconds ); + + bool signalReceived( false ); + AnimationFinishCheck finishCheck( signalReceived ); + animation.FinishedSignal().Connect( &application, finishCheck ); + application.SendNotification(); + + // Set range between 0.4 and 0.8 + animation.SetPlayRange( Vector2( 0.4f, 0.9f ) ); + application.SendNotification(); + DALI_TEST_EQUALS( Vector2( 0.4f, 0.9f ), animation.GetPlayRange(), TEST_LOCATION ); + + Vector3 targetPosition( 100.0f, 100.0f, 100.0f ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION ), targetPosition, AlphaFunction::LINEAR ); + + // Start the animation from 40% progress + animation.Play(); + + application.SendNotification(); + application.Render( static_cast< unsigned int >( durationSeconds * 200.0f )/* 60% progress */ ); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.6f ), TEST_LOCATION ); + + application.SendNotification(); + application.Render( static_cast< unsigned int >( durationSeconds * 200.0f )/* 80% progress */ ); + + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.8f ), TEST_LOCATION ); + + application.SendNotification(); + application.Render( static_cast< unsigned int >( durationSeconds*100.0f ) + 1u/*just beyond the animation duration*/ ); + + // We did expect the animation to finish + application.SendNotification(); + finishCheck.CheckSignalReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.9f ), TEST_LOCATION ); + END_TEST; +} + +int UtcDaliAnimationSetPlayRangeN(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + + // Build the animation + Animation animation = Animation::New(0); + application.SendNotification(); + + //PlayRange out of bounds + animation.SetPlayRange( Vector2(-1.0f,1.0f) ); + application.SendNotification(); + DALI_TEST_EQUALS( Vector2(0.0f,1.0f), animation.GetPlayRange(), TEST_LOCATION ); + animation.SetPlayRange( Vector2(0.0f,2.0f) ); + application.SendNotification(); + DALI_TEST_EQUALS( Vector2(0.0f,1.0f), animation.GetPlayRange(), TEST_LOCATION ); + + //If playRange is not in the correct order it has to be ordered + animation.SetPlayRange( Vector2(0.8f,0.2f) ); + application.SendNotification(); + DALI_TEST_EQUALS( Vector2(0.2f,0.8f), animation.GetPlayRange(), TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliAnimationGetPlayRangeP(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add( actor ); + + // Build the animation + Animation animation = Animation::New( 1.0f ); + application.SendNotification(); + + //If PlayRange not specified it should be 0.0-1.0 by default + DALI_TEST_EQUALS( Vector2( 0.0f,1.0f ), animation.GetPlayRange(), TEST_LOCATION ); + + // Set range between 0.4 and 0.8 + animation.SetPlayRange( Vector2( 0.4f, 0.8f ) ); + application.SendNotification(); + DALI_TEST_EQUALS( Vector2( 0.4f, 0.8f ), animation.GetPlayRange(), TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliAnimationPlayP(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + + // Build the animation + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); + Vector3 targetPosition(100.0f, 100.0f, 100.0f); + animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR); + + // Start the animation + animation.Play(); + + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*200.0f)/* 20% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION ); + + animation.Play(); // Test that calling play has no effect, when animation is already playing + application.SendNotification(); + application.Render(static_cast(durationSeconds*200.0f)/* 40% progress */); // We didn't expect the animation to finish yet application.SendNotification(); @@ -2015,7 +2501,101 @@ int UtcDaliAnimationPauseP(void) END_TEST; } -int UtcDaliAnimationStoP(void) + +int UtcDaliAnimationGetStateP(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + + // Build the animation + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); + Vector3 targetPosition(100.0f, 100.0f, 100.0f); + animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR); + DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION ); + + Vector3 fiftyPercentProgress(targetPosition * 0.5f); + + // Start the animation + animation.Play(); + + DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION ); + + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*500.0f)/* 50% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION ); + + // Pause the animation + animation.Pause(); + DALI_TEST_EQUALS( animation.GetState(), Animation::PAUSED, TEST_LOCATION ); + application.SendNotification(); + application.Render(0.f); + + // Loop 5 times + for (int i=0; i<5; ++i) + { + application.Render(static_cast(durationSeconds*500.0f)); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION ); + DALI_TEST_EQUALS( animation.GetState(), Animation::PAUSED, TEST_LOCATION ); + } + + // Keep going + finishCheck.Reset(); + animation.Play(); + DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION ); + application.SendNotification(); + application.Render(static_cast(durationSeconds*490.0f)/*slightly less than the animation duration*/); + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION ); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/); + + // We did expect the animation to finish + application.SendNotification(); + finishCheck.CheckSignalReceived(); + DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION ); + + // Check that nothing has changed after a couple of buffer swaps + application.Render(0); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + application.Render(0); + DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION ); + DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION ); + + // re-play + finishCheck.Reset(); + animation.Play(); + DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION ); + application.SendNotification(); + application.Render(static_cast(durationSeconds*490.0f)/*slightly less than the animation duration*/); + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION ); + + + END_TEST; +} + +int UtcDaliAnimationStopP(void) { TestApplication application; @@ -2214,6 +2794,7 @@ int UtcDaliAnimationAnimateByBooleanP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); // Build the animation float durationSeconds(2.0f); @@ -2235,7 +2816,7 @@ int UtcDaliAnimationAnimateByBooleanP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -2243,13 +2824,13 @@ int UtcDaliAnimationAnimateByBooleanP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Repeat with relative value "false" - this should be an NOOP animation = Animation::New(durationSeconds); @@ -2268,7 +2849,7 @@ int UtcDaliAnimationAnimateByBooleanP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -2276,13 +2857,13 @@ int UtcDaliAnimationAnimateByBooleanP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); END_TEST; } @@ -2297,6 +2878,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); // Build the animation float durationSeconds(2.0f); @@ -2318,7 +2900,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -2326,13 +2908,13 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Repeat with relative value "false" - this should be an NOOP animation = Animation::New(durationSeconds); @@ -2351,7 +2933,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -2359,7 +2941,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); END_TEST; } @@ -2374,6 +2956,7 @@ int UtcDaliAnimationAnimateByBooleanTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); // Build the animation float durationSeconds(2.0f); @@ -2398,7 +2981,7 @@ int UtcDaliAnimationAnimateByBooleanTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); application.SendNotification(); application.Render(static_cast(animatorDurationSeconds*50.0f) + 1u/*just beyond the animator duration*/); @@ -2408,7 +2991,7 @@ int UtcDaliAnimationAnimateByBooleanTimePeriodP(void) finishCheck.CheckSignalNotReceived(); // ...however we should have reached the final value - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.SendNotification(); application.Render(static_cast(animatorDurationSeconds*1000.0f)/*just beyond the animation duration*/); @@ -2416,13 +2999,13 @@ int UtcDaliAnimationAnimateByBooleanTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); END_TEST; } @@ -2437,6 +3020,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); // Build the animation float durationSeconds(2.0f); @@ -2462,7 +3046,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); application.SendNotification(); application.Render(static_cast(animatorDurationSeconds*50.0f) + 1u/*just beyond the animator duration*/); @@ -2472,7 +3056,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionTimePeriodP(void) finishCheck.CheckSignalNotReceived(); // ...however we should have reached the final value - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.SendNotification(); application.Render(static_cast(animatorDurationSeconds*1000.0f)/*just beyond the animation duration*/); @@ -2480,13 +3064,13 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); END_TEST; } @@ -2501,6 +3085,7 @@ int UtcDaliAnimationAnimateByFloatP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -2524,7 +3109,7 @@ int UtcDaliAnimationAnimateByFloatP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -2532,13 +3117,13 @@ int UtcDaliAnimationAnimateByFloatP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -2553,6 +3138,7 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -2578,7 +3164,7 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - float current(actor.GetProperty(index)); + float current( DevelHandle::GetCurrentProperty< float >( actor, index ) ); DALI_TEST_CHECK( current > ninetyFivePercentProgress ); application.SendNotification(); @@ -2587,13 +3173,13 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -2608,6 +3194,7 @@ int UtcDaliAnimationAnimateByFloatTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -2632,7 +3219,7 @@ int UtcDaliAnimationAnimateByFloatTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -2640,7 +3227,7 @@ int UtcDaliAnimationAnimateByFloatTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -2648,13 +3235,13 @@ int UtcDaliAnimationAnimateByFloatTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -2669,6 +3256,7 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -2694,7 +3282,7 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -2702,7 +3290,7 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -2710,13 +3298,13 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -2731,6 +3319,7 @@ int UtcDaliAnimationAnimateByIntegerP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -2754,7 +3343,7 @@ int UtcDaliAnimationAnimateByIntegerP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -2762,13 +3351,13 @@ int UtcDaliAnimationAnimateByIntegerP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -2783,6 +3372,7 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -2808,7 +3398,7 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - int current(actor.GetProperty(index)); + int current( DevelHandle::GetCurrentProperty< int >( actor, index ) ); DALI_TEST_CHECK( current > ninetyFivePercentProgress ); application.SendNotification(); @@ -2817,13 +3407,13 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -2838,6 +3428,7 @@ int UtcDaliAnimationAnimateByIntegerTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -2862,7 +3453,7 @@ int UtcDaliAnimationAnimateByIntegerTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -2870,7 +3461,7 @@ int UtcDaliAnimationAnimateByIntegerTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), static_cast(startValue+(relativeValue*0.5f)+0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), static_cast(startValue+(relativeValue*0.5f)+0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -2878,13 +3469,13 @@ int UtcDaliAnimationAnimateByIntegerTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -2899,6 +3490,7 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -2924,7 +3516,7 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -2932,7 +3524,7 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), static_cast(startValue+(relativeValue*0.5f)+0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), static_cast(startValue+(relativeValue*0.5f)+0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -2940,13 +3532,13 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -2961,6 +3553,7 @@ int UtcDaliAnimationAnimateByVector2P(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -2984,7 +3577,7 @@ int UtcDaliAnimationAnimateByVector2P(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -2992,13 +3585,13 @@ int UtcDaliAnimationAnimateByVector2P(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3013,6 +3606,7 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3038,7 +3632,7 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - Vector2 current(actor.GetProperty(index)); + Vector2 current( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ) ); DALI_TEST_CHECK( current.x < ninetyFivePercentProgress.x ); DALI_TEST_CHECK( current.y < ninetyFivePercentProgress.y ); @@ -3048,13 +3642,13 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3069,6 +3663,7 @@ int UtcDaliAnimationAnimateByVector2TimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3093,7 +3688,7 @@ int UtcDaliAnimationAnimateByVector2TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -3101,7 +3696,7 @@ int UtcDaliAnimationAnimateByVector2TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -3109,13 +3704,13 @@ int UtcDaliAnimationAnimateByVector2TimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3130,6 +3725,7 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3155,7 +3751,7 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -3163,7 +3759,7 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -3171,13 +3767,13 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3192,6 +3788,7 @@ int UtcDaliAnimationAnimateByVector3P(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -3215,7 +3812,7 @@ int UtcDaliAnimationAnimateByVector3P(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -3223,13 +3820,13 @@ int UtcDaliAnimationAnimateByVector3P(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3244,6 +3841,7 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3269,7 +3867,7 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - Vector3 current(actor.GetProperty(index)); + Vector3 current(DevelHandle::GetCurrentProperty< Vector3 >( actor, index )); DALI_TEST_CHECK( current.x < ninetyFivePercentProgress.x ); DALI_TEST_CHECK( current.y < ninetyFivePercentProgress.y ); DALI_TEST_CHECK( current.z < ninetyFivePercentProgress.z ); @@ -3280,13 +3878,13 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3301,6 +3899,7 @@ int UtcDaliAnimationAnimateByVector3TimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3325,7 +3924,7 @@ int UtcDaliAnimationAnimateByVector3TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -3333,7 +3932,7 @@ int UtcDaliAnimationAnimateByVector3TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -3341,13 +3940,13 @@ int UtcDaliAnimationAnimateByVector3TimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3362,6 +3961,7 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3387,7 +3987,7 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -3395,7 +3995,7 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -3403,13 +4003,13 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3424,6 +4024,7 @@ int UtcDaliAnimationAnimateByVector4P(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -3447,7 +4048,7 @@ int UtcDaliAnimationAnimateByVector4P(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -3455,13 +4056,13 @@ int UtcDaliAnimationAnimateByVector4P(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3476,6 +4077,7 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3501,7 +4103,7 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - Vector4 current(actor.GetProperty(index)); + Vector4 current( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ) ); DALI_TEST_CHECK( current.x < ninetyFivePercentProgress.x ); DALI_TEST_CHECK( current.y < ninetyFivePercentProgress.y ); DALI_TEST_CHECK( current.z < ninetyFivePercentProgress.z ); @@ -3513,13 +4115,13 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3534,6 +4136,7 @@ int UtcDaliAnimationAnimateByVector4TimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3558,7 +4161,7 @@ int UtcDaliAnimationAnimateByVector4TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -3566,7 +4169,7 @@ int UtcDaliAnimationAnimateByVector4TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -3574,13 +4177,13 @@ int UtcDaliAnimationAnimateByVector4TimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3595,6 +4198,7 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -3620,7 +4224,7 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -3628,7 +4232,7 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -3636,13 +4240,13 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); application.Render(0); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -3866,7 +4470,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionTimePeriodP(void) END_TEST; } -int UtcDaliAnimationAnimateByActorOrientationP(void) +int UtcDaliAnimationAnimateByActorOrientationP1(void) { TestApplication application; @@ -3923,6 +4527,131 @@ int UtcDaliAnimationAnimateByActorOrientationP(void) END_TEST; } +int UtcDaliAnimationAnimateByActorOrientationP2(void) +{ + TestApplication application; + + tet_printf("Testing that rotation angle > 360 performs full rotations\n"); + + Actor actor = Actor::New(); + actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) ); + Stage::GetCurrent().Add(actor); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + + // Build the animation + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); + Degree relativeRotationDegrees(710.0f); + Radian relativeRotationRadians(relativeRotationDegrees); + + animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), AngleAxis( relativeRotationRadians, Vector3::ZAXIS ) ); + + // Start the animation + animation.Play(); + + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); + + // We did expect the animation to finish + application.SendNotification(); + finishCheck.CheckSignalReceived(); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + END_TEST; +} + + +int UtcDaliAnimationAnimateByActorOrientationP3(void) +{ + TestApplication application; + + tet_printf("Testing that rotation angle > 360 performs partial rotations when cast to Quaternion\n"); + + Actor actor = Actor::New(); + actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) ); + Stage::GetCurrent().Add(actor); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION ); + + // Build the animation + float durationSeconds(1.0f); + Animation animation = Animation::New(durationSeconds); + Degree relativeRotationDegrees(730.0f); + Radian relativeRotationRadians(relativeRotationDegrees); + + Radian actualRotationRadians( Degree(10.0f) ); + + animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( relativeRotationRadians, Vector3::ZAXIS ) ); + + // Start the animation + animation.Play(); + + bool signalReceived(false); + AnimationFinishCheck finishCheck(signalReceived); + animation.FinishedSignal().Connect(&application, finishCheck); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); + + // We didn't expect the animation to finish yet + application.SendNotification(); + finishCheck.CheckSignalNotReceived(); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + + application.SendNotification(); + application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); + + // We did expect the animation to finish + application.SendNotification(); + finishCheck.CheckSignalReceived(); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION ); + END_TEST; +} + + int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void) { TestApplication application; @@ -4162,6 +4891,7 @@ int UtcDaliAnimationAnimateToBooleanP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); // Build the animation float durationSeconds(2.0f); @@ -4182,7 +4912,7 @@ int UtcDaliAnimationAnimateToBooleanP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4190,13 +4920,13 @@ int UtcDaliAnimationAnimateToBooleanP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == targetValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == targetValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == targetValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == targetValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == targetValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == targetValue ); // Repeat with target value "false" animation = Animation::New(durationSeconds); @@ -4215,7 +4945,7 @@ int UtcDaliAnimationAnimateToBooleanP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == targetValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == targetValue ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4223,13 +4953,13 @@ int UtcDaliAnimationAnimateToBooleanP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); END_TEST; } @@ -4244,6 +4974,7 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); // Build the animation float durationSeconds(2.0f); @@ -4264,7 +4995,7 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4272,13 +5003,13 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == targetValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == targetValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == targetValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == targetValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == targetValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == targetValue ); // Repeat with target value "false" animation = Animation::New(durationSeconds); @@ -4297,7 +5028,7 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == targetValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == targetValue ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4305,13 +5036,13 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); END_TEST; } @@ -4326,6 +5057,7 @@ int UtcDaliAnimationAnimateToBooleanTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); // Build the animation float durationSeconds(2.0f); @@ -4349,7 +5081,7 @@ int UtcDaliAnimationAnimateToBooleanTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); application.SendNotification(); application.Render(static_cast(animatorDurationSeconds*50.0f) + 1u/*just beyond the animator duration*/); @@ -4359,7 +5091,7 @@ int UtcDaliAnimationAnimateToBooleanTimePeriodP(void) finishCheck.CheckSignalNotReceived(); // ...however we should have reached the final value - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.SendNotification(); application.Render(static_cast(animatorDurationSeconds*1000.0f)/*just beyond the animation duration*/); @@ -4367,13 +5099,13 @@ int UtcDaliAnimationAnimateToBooleanTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); END_TEST; } @@ -4388,6 +5120,7 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); // Build the animation float durationSeconds(2.0f); @@ -4412,7 +5145,7 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == startValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == startValue ); application.SendNotification(); application.Render(static_cast(animatorDurationSeconds*50.0f) + 1u/*just beyond the animator duration*/); @@ -4422,7 +5155,7 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionTimePeriodP(void) finishCheck.CheckSignalNotReceived(); // ...however we should have reached the final value - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.SendNotification(); application.Render(static_cast(animatorDurationSeconds*1000.0f)/*just beyond the animation duration*/); @@ -4430,13 +5163,13 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); // Check that nothing has changed after a couple of buffer swaps application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); application.Render(0); - DALI_TEST_CHECK( actor.GetProperty(index) == finalValue ); + DALI_TEST_CHECK( DevelHandle::GetCurrentProperty< bool >( actor, index ) == finalValue ); END_TEST; } @@ -4451,6 +5184,7 @@ int UtcDaliAnimationAnimateToFloatP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -4474,7 +5208,7 @@ int UtcDaliAnimationAnimateToFloatP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4482,7 +5216,7 @@ int UtcDaliAnimationAnimateToFloatP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4497,6 +5231,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4522,7 +5257,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - float current(actor.GetProperty(index)); + float current( DevelHandle::GetCurrentProperty< float >( actor, index ) ); DALI_TEST_CHECK( current > ninetyFivePercentProgress ); application.SendNotification(); @@ -4531,7 +5266,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4546,6 +5281,7 @@ int UtcDaliAnimationAnimateToFloatTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4570,7 +5306,7 @@ int UtcDaliAnimationAnimateToFloatTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -4578,7 +5314,7 @@ int UtcDaliAnimationAnimateToFloatTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4586,7 +5322,7 @@ int UtcDaliAnimationAnimateToFloatTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4601,6 +5337,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4626,7 +5363,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -4634,7 +5371,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4642,7 +5379,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4657,6 +5394,7 @@ int UtcDaliAnimationAnimateToIntegerP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -4680,7 +5418,7 @@ int UtcDaliAnimationAnimateToIntegerP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4688,7 +5426,7 @@ int UtcDaliAnimationAnimateToIntegerP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4703,6 +5441,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4728,7 +5467,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - int current(actor.GetProperty(index)); + int current( DevelHandle::GetCurrentProperty< int >( actor, index ) ); DALI_TEST_CHECK( current > ninetyFivePercentProgress ); application.SendNotification(); @@ -4737,7 +5476,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4752,6 +5491,7 @@ int UtcDaliAnimationAnimateToIntegerTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4776,7 +5516,7 @@ int UtcDaliAnimationAnimateToIntegerTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -4784,7 +5524,7 @@ int UtcDaliAnimationAnimateToIntegerTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), static_cast(startValue+(relativeValue*0.5f)+0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), static_cast(startValue+(relativeValue*0.5f)+0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4792,7 +5532,7 @@ int UtcDaliAnimationAnimateToIntegerTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4807,6 +5547,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4832,7 +5573,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -4840,7 +5581,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), static_cast(startValue+(relativeValue*0.5f)+0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), static_cast(startValue+(relativeValue*0.5f)+0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4848,7 +5589,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4862,7 +5603,8 @@ int UtcDaliAnimationAnimateToVector2P(void) Vector2 startValue(-50.0f, -50.0f); Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -4886,7 +5628,7 @@ int UtcDaliAnimationAnimateToVector2P(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -4894,7 +5636,7 @@ int UtcDaliAnimationAnimateToVector2P(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4908,7 +5650,8 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionP(void) Vector2 startValue(1000.0f, 1000.0f); Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4934,7 +5677,7 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - Vector2 current(actor.GetProperty(index)); + Vector2 current( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ) ); DALI_TEST_CHECK( current.x > ninetyFivePercentProgress.x ); DALI_TEST_CHECK( current.y > ninetyFivePercentProgress.y ); @@ -4944,7 +5687,7 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -4958,7 +5701,8 @@ int UtcDaliAnimationAnimateToVector2TimePeriodP(void) Vector2 startValue(10.0f, 10.0f); Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -4983,7 +5727,7 @@ int UtcDaliAnimationAnimateToVector2TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -4991,7 +5735,7 @@ int UtcDaliAnimationAnimateToVector2TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -4999,7 +5743,7 @@ int UtcDaliAnimationAnimateToVector2TimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5013,7 +5757,8 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionTimePeriodP(void) Vector2 startValue(10.0f, 10.0f); Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5036,10 +5781,11 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionTimePeriodP(void) application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f)/* 50% animation progress, 0% animator progress */); - // We didn't expect the animation to finish yet + // We didn't expect the animation to finish yet, but cached value should be the final one application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -5047,7 +5793,7 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5055,7 +5801,8 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector2 >( actor, index ), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5069,7 +5816,8 @@ int UtcDaliAnimationAnimateToVector3P(void) Vector3 startValue(-50.0f, -50.0f, -50.0f); Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty( index ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -5093,7 +5841,7 @@ int UtcDaliAnimationAnimateToVector3P(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -5101,7 +5849,7 @@ int UtcDaliAnimationAnimateToVector3P(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5116,6 +5864,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5141,7 +5890,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - Vector3 current(actor.GetProperty(index)); + Vector3 current( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ) ); DALI_TEST_CHECK( current.x > ninetyFivePercentProgress.x ); DALI_TEST_CHECK( current.y > ninetyFivePercentProgress.y ); DALI_TEST_CHECK( current.z > ninetyFivePercentProgress.z ); @@ -5152,7 +5901,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5167,6 +5916,7 @@ int UtcDaliAnimationAnimateToVector3TimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5191,7 +5941,7 @@ int UtcDaliAnimationAnimateToVector3TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -5199,7 +5949,7 @@ int UtcDaliAnimationAnimateToVector3TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5207,7 +5957,7 @@ int UtcDaliAnimationAnimateToVector3TimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5222,6 +5972,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5247,7 +5998,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -5255,7 +6006,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5263,7 +6014,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5278,6 +6029,7 @@ int UtcDaliAnimationAnimateToVector3ComponentP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5307,7 +6059,7 @@ int UtcDaliAnimationAnimateToVector3ComponentP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -5315,7 +6067,7 @@ int UtcDaliAnimationAnimateToVector3ComponentP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5323,7 +6075,7 @@ int UtcDaliAnimationAnimateToVector3ComponentP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector3 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5338,6 +6090,7 @@ int UtcDaliAnimationAnimateToVector4P(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(2.0f); @@ -5361,7 +6114,7 @@ int UtcDaliAnimationAnimateToVector4P(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), ninetyFivePercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), ninetyFivePercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/); @@ -5369,7 +6122,7 @@ int UtcDaliAnimationAnimateToVector4P(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5384,6 +6137,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5409,7 +6163,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionP(void) finishCheck.CheckSignalNotReceived(); // The position should have moved more, than with a linear alpha function - Vector4 current(actor.GetProperty(index)); + Vector4 current( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ) ); DALI_TEST_CHECK( current.x > ninetyFivePercentProgress.x ); DALI_TEST_CHECK( current.y > ninetyFivePercentProgress.y ); DALI_TEST_CHECK( current.z > ninetyFivePercentProgress.z ); @@ -5421,7 +6175,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5435,7 +6189,8 @@ int UtcDaliAnimationAnimateToVector4TimePeriodP(void) Vector4 startValue(10.0f, 10.0f, 10.0f, 10.0f); Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, VECTOR4_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, VECTOR4_EPSILON, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5460,7 +6215,7 @@ int UtcDaliAnimationAnimateToVector4TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, VECTOR4_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, VECTOR4_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -5468,7 +6223,7 @@ int UtcDaliAnimationAnimateToVector4TimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), VECTOR4_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue+(relativeValue*0.5f), VECTOR4_EPSILON, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5476,7 +6231,7 @@ int UtcDaliAnimationAnimateToVector4TimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, VECTOR4_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, VECTOR4_EPSILON, TEST_LOCATION ); END_TEST; } @@ -5491,6 +6246,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionTimePeriodP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -5516,7 +6272,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -5524,7 +6280,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionTimePeriodP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -5532,7 +6288,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionTimePeriodP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< Vector4 >( actor, index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -5764,9 +6520,21 @@ int UtcDaliAnimationAnimateToActorSizeP(void) Vector3 ninetyNinePercentProgress(targetSize * 0.99f); + // Should return the initial properties before play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), 0.0f, TEST_LOCATION ); + // Start the animation animation.Play(); + // Should return the target property after play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), targetSize.width, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetSize.height, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetSize.depth, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -5874,9 +6642,17 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void) float fiftyPercentProgress(startValue + (targetWidth - startValue)*0.5f); + // Should return the initial properties before play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), startValue, TEST_LOCATION ); + // Start the animation animation.Play(); + // Should return the target property after play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3( targetWidth, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_WIDTH ), targetWidth, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -5918,9 +6694,17 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void) float fiftyPercentProgress(startValue + (targetHeight - startValue)*0.5f); + // Should return the initial properties before play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), startValue, TEST_LOCATION ); + // Start the animation animation.Play(); + // Should return the target property after play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3( 0.0f, targetHeight, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetHeight, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -5962,9 +6746,17 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void) float fiftyPercentProgress(startValue + (targetDepth - startValue)*0.5f); + // Should return the initial properties before play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), startValue, TEST_LOCATION ); + // Start the animation animation.Play(); + // Should return the target property after play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3( 0.0f, 0.0f, targetDepth ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetDepth, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6114,9 +6906,21 @@ int UtcDaliAnimationAnimateToActorPositionP(void) Vector3 seventyFivePercentProgress(targetPosition * 0.75f); + // Should return the initial properties before play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), 0.0f, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), 0.0f, TEST_LOCATION ); + // Start the animation animation.Play(); + // Should return the target property after play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), targetPosition.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), targetPosition.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), targetPosition.z, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6159,9 +6963,17 @@ int UtcDaliAnimationAnimateToActorPositionXP(void) float fiftyPercentProgress(startValue + (targetX - startValue)*0.5f); + // Should return the initial properties before play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), startValue, TEST_LOCATION ); + // Start the animation animation.Play(); + // Should return the target property after play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3( targetX, 0.0f, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), targetX, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6207,9 +7019,17 @@ int UtcDaliAnimationAnimateToActorPositionYP(void) float fiftyPercentProgress(startValue + (targetY - startValue)*0.5f); + // Should return the initial properties before play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), startValue, TEST_LOCATION ); + // Start the animation animation.Play(); + // Should return the target property after play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, targetY, 0.0f ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), targetY, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6255,9 +7075,17 @@ int UtcDaliAnimationAnimateToActorPositionZP(void) float fiftyPercentProgress(startValue + (targetZ - startValue)*0.5f); + // Should return the initial properties before play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), startValue, TEST_LOCATION ); + // Start the animation animation.Play(); + // Should return the target property after play + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, targetZ ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), targetZ, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6456,6 +7284,9 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6750,6 +7581,12 @@ int UtcDaliAnimationAnimateToActorScaleP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_X ), targetScale.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Y ), targetScale.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Z ), targetScale.z, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6850,6 +7687,9 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -6862,6 +7702,10 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3( targetX, startValue, startValue ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_X ), targetX, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6873,9 +7717,9 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( actor.GetCurrentScale().x, fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -6884,9 +7728,9 @@ int UtcDaliAnimationAnimateToActorScaleXP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( actor.GetCurrentScale().x, targetX, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), targetX, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), targetX, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); END_TEST; } @@ -6901,6 +7745,9 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -6913,6 +7760,10 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3( startValue, targetY, startValue ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Y ), targetY, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6924,9 +7775,9 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( actor.GetCurrentScale().y, fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -6935,9 +7786,9 @@ int UtcDaliAnimationAnimateToActorScaleYP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( actor.GetCurrentScale().y, targetY, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), targetY, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), targetY, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); END_TEST; } @@ -6952,6 +7803,9 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -6964,6 +7818,10 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3( startValue, startValue, targetZ ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Z ), targetZ, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -6975,9 +7833,9 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( actor.GetCurrentScale().z, fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -6986,9 +7844,9 @@ int UtcDaliAnimationAnimateToActorScaleZP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( actor.GetCurrentScale().z, targetZ, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_X), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Y), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SCALE_Z), targetZ, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_X ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Y ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::SCALE_Z ), targetZ, TEST_LOCATION ); END_TEST; } @@ -7012,6 +7870,14 @@ int UtcDaliAnimationAnimateToActorColorP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_RED ), targetColor.r, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), targetColor.g, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetColor.b, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetColor.a, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( DevelActor::Property::OPACITY ), targetColor.a, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7121,6 +7987,10 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7133,6 +8003,10 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( targetRed, startValue, startValue, startValue ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_RED ), targetRed, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7144,10 +8018,10 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( actor.GetCurrentColor().r, fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7156,10 +8030,10 @@ int UtcDaliAnimationAnimateToActorColorRedP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( actor.GetCurrentColor().r, targetRed, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), targetRed, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), targetRed, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); END_TEST; } @@ -7175,6 +8049,10 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7187,6 +8065,10 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, targetGreen, startValue, startValue ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), targetGreen, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7198,10 +8080,10 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( actor.GetCurrentColor().g, fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7210,10 +8092,10 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( actor.GetCurrentColor().g, targetGreen, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), targetGreen, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), targetGreen, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); END_TEST; } @@ -7229,6 +8111,10 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7241,6 +8127,10 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, startValue, targetBlue, startValue ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetBlue, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7252,10 +8142,10 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( actor.GetCurrentColor().b, fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7264,10 +8154,10 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( actor.GetCurrentColor().b, targetBlue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), targetBlue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), targetBlue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); END_TEST; } @@ -7283,6 +8173,10 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7295,6 +8189,11 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) // Start the animation animation.Play(); + // Target value should be retrievable straight away + DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, startValue, startValue, targetAlpha ), TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetAlpha, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( DevelActor::Property::OPACITY ), targetAlpha, TEST_LOCATION ); + bool signalReceived(false); AnimationFinishCheck finishCheck(signalReceived); animation.FinishedSignal().Connect(&application, finishCheck); @@ -7306,10 +8205,10 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) application.SendNotification(); finishCheck.CheckSignalNotReceived(); DALI_TEST_EQUALS( actor.GetCurrentColor().a, fiftyPercentProgress, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), fiftyPercentProgress, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), fiftyPercentProgress, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -7318,10 +8217,10 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void) application.SendNotification(); finishCheck.CheckSignalReceived(); DALI_TEST_EQUALS( actor.GetCurrentColor().a, targetAlpha, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), targetAlpha, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), targetAlpha, TEST_LOCATION ); END_TEST; } @@ -7534,6 +8433,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7563,50 +8466,50 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void) application.Render(static_cast(durationSeconds*100.0f)/* 10% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), 0.3f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.3f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.25f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), 0.25f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.25f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 40% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), 0.0f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.0f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*400.0f)/* 80% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), 0.7f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.7f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 90% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), 0.8f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.8f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), 0.9f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.9f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -7629,6 +8532,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7658,50 +8565,50 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void) application.Render(static_cast(durationSeconds*100.0f)/* 10% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.36f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.36f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.36f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*200.0f)/* 30% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.21f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.21f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.21f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 40% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.0f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.0f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*400.0f)/* 80% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.7f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.7f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)/* 90% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.76f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.76f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.76f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*100.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.9f, 0.01f, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.9f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -7724,6 +8631,10 @@ int UtcDaliAnimationAnimateBetweenActorColorP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7746,38 +8657,38 @@ int UtcDaliAnimationAnimateBetweenActorColorP(void) application.Render(0); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.1f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.2f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.1f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.2f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.5f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.6f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.6f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.95f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.90f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.85f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.80f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.95f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.90f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.85f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.80f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 1.0f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -7799,6 +8710,10 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -7821,38 +8736,38 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicP(void) application.Render(0); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.1f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.2f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.1f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.2f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.55f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.525f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.506f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4875f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.55f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.525f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.506f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4875f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.6f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.6f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.99375f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.925f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.85625f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.7875f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.99375f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.925f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.85625f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.7875f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 1.0f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -8183,6 +9098,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8205,38 +9124,38 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionP(void) application.Render(0); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.1f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.2f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.1f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.2f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.5f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.6f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.6f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.95f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.90f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.85f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.80f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.95f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.90f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.85f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.80f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 1.0f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -8258,6 +9177,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionCubicP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8280,38 +9203,38 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionCubicP(void) application.Render(0); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.1f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.2f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.1f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.2f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 25% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.55f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.525f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.506f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4875f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.55f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.525f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.506f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4875f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 50% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.6f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.6f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)/* 75% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.99375f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.925f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.85625f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.7875f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.99375f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.925f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.85625f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.7875f, 0.01f, TEST_LOCATION ); application.Render(static_cast(durationSeconds*250.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 1.0f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -8333,6 +9256,10 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8357,38 +9284,38 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodP(void) application.Render(static_cast(delay*1000.0f)/* 0% progress */); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.1f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.2f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.1f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.2f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 25% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.5f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 50% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.6f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.6f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 75% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.95f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.90f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.85f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.80f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.95f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.90f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.85f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.80f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 1.0f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -8410,6 +9337,10 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodCubicP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8434,38 +9365,38 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodCubicP(void) application.Render(static_cast(delay*1000.0f)/* 0% progress */); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.1f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.2f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.1f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.2f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 25% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.55f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.525f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.506f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4875f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.55f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.525f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.506f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4875f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 50% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.6f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.6f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 75% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.99375f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.925f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.85625f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.7875f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.99375f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.925f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.85625f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.7875f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 1.0f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -8488,6 +9419,10 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionTimePeriodP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -8511,38 +9446,38 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionTimePeriodP(void) application.Render(static_cast(delay*1000.0f)/* 0% progress */); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.1f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.2f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.1f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.2f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 25% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.5f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.5f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.5f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 50% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.6f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.6f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 75% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.95f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.90f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.85f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.80f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.95f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.90f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.85f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.80f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 1.0f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -8564,6 +9499,11 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicWithDelayP(void) DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION ); DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION ); + // Build the animation float durationSeconds(1.0f); @@ -8588,38 +9528,38 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicWithDelayP(void) application.Render(static_cast(delay*1000.0f)/* 0% progress */); application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.1f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.2f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.3f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.1f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.2f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.3f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 25% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.55f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.525f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.506f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.4875f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.55f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.525f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.506f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.4875f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 50% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.9f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.8f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.7f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.6f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.9f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.8f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.7f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.6f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)/* 75% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.99375f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 0.925f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 0.85625f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 0.7875f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 0.99375f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 0.925f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 0.85625f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 0.7875f, 0.01f, TEST_LOCATION ); application.Render(static_cast((durationSeconds - delay)*250.0f)+1/* 100% progress */); application.SendNotification(); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_GREEN), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_BLUE), 1.0f, 0.01f, TEST_LOCATION ); - DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_ALPHA), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), 1.0f, 0.01f, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), 1.0f, 0.01f, TEST_LOCATION ); // We did expect the animation to finish @@ -9157,6 +10097,7 @@ int UtcDaliAnimationUpdateManagerP(void) // Apply animation to actor animation.AnimateTo( Property(actor, Actor::Property::POSITION), Vector3( 100.f, 90.f, 80.f ), AlphaFunction::LINEAR ); + animation.AnimateTo( Property(actor, DevelActor::Property::OPACITY), 0.3f, AlphaFunction::LINEAR ); animation.Play(); @@ -9236,6 +10177,7 @@ int UtcDaliAnimationExtendDurationP(void) Property::Index index = actor.RegisterProperty( "testProperty", startValue ); Stage::GetCurrent().Add(actor); DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float initialDurationSeconds(1.0f); @@ -9263,10 +10205,11 @@ int UtcDaliAnimationExtendDurationP(void) application.SendNotification(); application.Render(static_cast(extendedDurationSeconds*500.0f)/* 50% animation progress, 0% animator progress */); - // We didn't expect the animation to finish yet + // We didn't expect the animation to finish yet, but cached value should be the final one application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( index ), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(extendedDurationSeconds*250.0f)/* 75% animation progress, 50% animator progress */); @@ -9274,7 +10217,7 @@ int UtcDaliAnimationExtendDurationP(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue+(relativeValue*0.5f), TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), startValue+(relativeValue*0.5f), TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(extendedDurationSeconds*250.0f) + 1u/*just beyond the animation duration*/); @@ -9282,7 +10225,8 @@ int UtcDaliAnimationExtendDurationP(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, index ), targetValue, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty< float >( index ), targetValue, TEST_LOCATION ); END_TEST; } @@ -9295,7 +10239,7 @@ int UtcDaliAnimationCustomIntProperty(void) int startValue(0u); Property::Index index = actor.RegisterProperty("anIndex", startValue); - DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), startValue, TEST_LOCATION ); // Build the animation float durationSeconds(1.0f); @@ -9315,7 +10259,7 @@ int UtcDaliAnimationCustomIntProperty(void) // We didn't expect the animation to finish yet application.SendNotification(); finishCheck.CheckSignalNotReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), 10, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), 10, TEST_LOCATION ); application.SendNotification(); application.Render(static_cast(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/); @@ -9323,6 +10267,449 @@ int UtcDaliAnimationCustomIntProperty(void) // We did expect the animation to finish application.SendNotification(); finishCheck.CheckSignalReceived(); - DALI_TEST_EQUALS( actor.GetProperty(index), 20, TEST_LOCATION ); + DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< int >( actor, index ), 20, TEST_LOCATION ); + END_TEST; +} + +int UtcDaliAnimationDuration(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + + Animation animation = Animation::New( 0.0f ); + DALI_TEST_EQUALS( 0.0f, animation.GetDuration(), TEST_LOCATION ); + + // The animation duration should automatically increase depending on the animator time period + + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 100.0f, TimePeriod( 0.0f, 1.0f ) ); + DALI_TEST_EQUALS( 1.0f, animation.GetDuration(), TEST_LOCATION ); + + animation.AnimateTo( Property( actor, Actor::Property::POSITION_Y ), 200.0f, TimePeriod( 10.0f, 1.0f ) ); + DALI_TEST_EQUALS( 11.0f, animation.GetDuration(), TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliAnimationAnimateByNonAnimateableTypeN(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + + // Register an integer property + int startValue(1); + Property::Index index = actor.RegisterProperty( "testProperty", startValue ); + Stage::GetCurrent().Add(actor); + DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + + try + { + // Build the animation + Animation animation = Animation::New( 2.0f ); + std::string relativeValue = "relative string"; + animation.AnimateBy( Property(actor, index), relativeValue ); + tet_result(TET_FAIL); + } + catch ( Dali::DaliException& e ) + { + DALI_TEST_ASSERT( e, "Animated value and Property type don't match", TEST_LOCATION ); + } + + + END_TEST; +} + + +int UtcDaliAnimationAnimateToNonAnimateableTypeN(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + + // Register an integer property + int startValue(1); + Property::Index index = actor.RegisterProperty( "testProperty", startValue ); + Stage::GetCurrent().Add(actor); + DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + + try + { + // Build the animation + Animation animation = Animation::New( 2.0f ); + std::string relativeValue = "relative string"; + animation.AnimateTo( Property(actor, index), relativeValue ); + + tet_result(TET_FAIL); + } + catch ( Dali::DaliException& e ) + { + DALI_TEST_ASSERT( e, "Animated value and Property type don't match", TEST_LOCATION ); + } + + END_TEST; +} + +int UtcDaliAnimationAnimateBetweenNonAnimateableTypeN(void) +{ + TestApplication application; + + Actor actor = Actor::New(); + + // Register an integer property + int startValue(1); + Property::Index index = actor.RegisterProperty( "testProperty", startValue ); + Stage::GetCurrent().Add(actor); + DALI_TEST_EQUALS( actor.GetProperty(index), startValue, TEST_LOCATION ); + + try + { + // Build the animation + KeyFrames keyFrames = KeyFrames::New(); + keyFrames.Add( 0.0f, std::string("relative string1") ); + keyFrames.Add( 1.0f, std::string("relative string2") ); + // no need to really create the animation as keyframes do the check + + tet_result(TET_FAIL); + } + catch ( Dali::DaliException& e ) + { + DALI_TEST_ASSERT( e, "Type not animateable", TEST_LOCATION ); + } + + END_TEST; +} + +int UtcDaliAnimationSetAndGetTargetBeforePlayP(void) +{ + tet_infoline("Setting up an animation should not effect it's position property until the animation plays"); + + TestApplication application; + + tet_infoline("Set initial position and set up animation to re-position actor"); + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + Vector3 initialPosition(0.0f, 0.0f, 0.0f); + actor.SetProperty( Actor::Property::POSITION, initialPosition ); + + // Build the animation + Animation animation = Animation::New(2.0f); + + //Test GetCurrentProgress return 0.0 as the duration is 0.0 + DALI_TEST_EQUALS( 0.0f, animation.GetCurrentProgress(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentPosition(), TEST_LOCATION ); + + tet_infoline("Set target position in animation without intiating play"); + + Vector3 targetPosition(100.0f, 100.0f, 100.0f); + animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR); + + application.SendNotification(); + application.Render(); + + tet_infoline("Ensure position of actor is still at intial value"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), initialPosition.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), initialPosition.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), initialPosition.z, TEST_LOCATION ); + + tet_infoline("Play animation and ensure actor position is now target"); + + animation.Play(); + application.SendNotification(); + application.Render(1000u); + + tet_infoline("Ensure position of actor is at target value when aninmation half way"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), targetPosition.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPosition.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPosition.z, TEST_LOCATION ); + + tet_printf( "x position at half way point(%f)\n", actor.GetCurrentPosition().x ); + + application.Render(2000u); + + tet_infoline("Ensure position of actor is still at target value when aninmation complete"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), targetPosition.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPosition.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPosition.z, TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsPositionP(void) +{ + tet_infoline("Setting up an animation should not effect it's position property until the animation plays even with mulitple animators"); + + TestApplication application; + + std::vector targetPositions; + + targetPositions.push_back( Vector3( 100.0f, 100.0f, 100.0f ) ); + targetPositions.push_back( Vector3( 200.0f, 1.0f, 100.0f ) ); + targetPositions.push_back( Vector3( 50.0f, 10.0f, 100.0f ) ); + + tet_infoline("Set initial position and set up animation to re-position actor"); + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + Vector3 initialPosition(0.0f, 0.0f, 0.0f); + actor.SetProperty( Actor::Property::POSITION, initialPosition ); + + // Build the animation + Animation animation = Animation::New(2.0f); + + //Test GetCurrentProgress return 0.0 as the duration is 0.0 + DALI_TEST_EQUALS( 0.0f, animation.GetCurrentProgress(), TEST_LOCATION ); + DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentPosition(), TEST_LOCATION ); + + tet_infoline("Set target position in animation without intiating play"); + + for ( unsigned int i = 0; i < targetPositions.size(); i++ ) + { + animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPositions[i], AlphaFunction::LINEAR); + } + + application.SendNotification(); + application.Render(); + + tet_infoline("Ensure position of actor is still at intial value"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), initialPosition.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), initialPosition.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), initialPosition.z, TEST_LOCATION ); + + tet_infoline("Play animation and ensure actor position is now target"); + + animation.Play(); + application.SendNotification(); + application.Render(1000u); + + tet_infoline("Ensure position of actor is at target value when aninmation half way"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), targetPositions[2].x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPositions[2].y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPositions[2].z, TEST_LOCATION ); + + tet_printf( "x position at half way point(%f)\n", actor.GetCurrentPosition().x ); + + application.Render(2000u); + + tet_infoline("Ensure position of actor is still at target value when aninmation complete"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), targetPositions[2].x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPositions[2].y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPositions[2].z, TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsSizeAndPositionP(void) +{ + tet_infoline("Setting up an animation should not effect it's size property until the animation plays even with mulitple animators of different Property Indexes"); + + TestApplication application; + + std::vector targetSizes; + std::vector targetPositions; + + targetSizes.push_back( Vector3( 100.0f, 100.0f, 100.0f ) ); + targetSizes.push_back( Vector3( 50.0f, 10.0f, 100.0f ) ); + + targetPositions.push_back( Vector3( 200.0f, 1.0f, 100.0f ) ); + + tet_infoline("Set initial position and set up animation to re-position actor"); + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + Vector3 initialSize( 10.0f, 10.0f, 10.0f); + Vector3 initialPosition(10.0f, 10.0f, 10.0f); + + actor.SetProperty( Actor::Property::SIZE, initialSize ); + actor.SetProperty( Actor::Property::POSITION, initialPosition ); + + // Build the animation + Animation animation = Animation::New(2.0f); + + tet_infoline("Set target size in animation without intiating play"); + animation.AnimateTo(Property(actor, Actor::Property::SIZE), targetSizes[0], AlphaFunction::LINEAR); + tet_infoline("Set target position in animation without intiating play"); + animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPositions[0], AlphaFunction::LINEAR); + animation.AnimateTo(Property(actor, Actor::Property::SIZE), targetSizes[1], AlphaFunction::LINEAR); + + application.SendNotification(); + application.Render(); + + tet_infoline("Ensure position of actor is still at intial size and position"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), initialSize.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), initialSize.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), initialSize.z, TEST_LOCATION ); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), initialPosition.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), initialPosition.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), initialPosition.z, TEST_LOCATION ); + + tet_infoline("Play animation and ensure actor position and size is now matches targets"); + + animation.Play(); + application.SendNotification(); + application.Render(2000u); + + tet_infoline("Ensure position and size of actor is at target value when aninmation playing"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), targetSizes[1].x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), targetSizes[1].y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), targetSizes[1].z, TEST_LOCATION ); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_X), targetPositions[0].x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Y), targetPositions[0].y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::POSITION_Z), targetPositions[0].z, TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsSizeAndPositionColourP(void) +{ + tet_infoline("Setting up an animation should not effect it's size property until the animation plays even if other Properties animated"); + + TestApplication application; + + std::vector targetSizes; + std::vector targetColors; + + targetSizes.push_back( Vector3( 100.0f, 100.0f, 100.0f ) ); + targetSizes.push_back( Vector3( 50.0f, 10.0f, 150.0f ) ); + + targetColors.push_back( 1.0f ); + + tet_infoline("Set initial position and set up animation to re-position actor"); + + Actor actor = Actor::New(); + Stage::GetCurrent().Add(actor); + Vector3 initialSize( 10.0f, 5.0f, 10.0f); + + actor.SetProperty( Actor::Property::SIZE, initialSize ); + + // Build the animation + Animation animation = Animation::New(2.0f); + + tet_infoline("Set target size in animation without initiating play"); + animation.AnimateTo(Property(actor, Actor::Property::SIZE), targetSizes[0], AlphaFunction::LINEAR); + tet_infoline("Set target position in animation without intiating play"); + animation.AnimateTo(Property(actor, Actor::Property::COLOR_RED), targetColors[0], AlphaFunction::LINEAR); + animation.AnimateTo(Property(actor, Actor::Property::SIZE), targetSizes[1], AlphaFunction::LINEAR); + + application.SendNotification(); + application.Render(); + + tet_infoline("Ensure position of actor is still at initial size and position"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), initialSize.x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), initialSize.y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), initialSize.z, TEST_LOCATION ); + + tet_infoline("Play animation and ensure actor position and size is now matches targets"); + + animation.Play(); + application.SendNotification(); + application.Render(2000u); + + tet_infoline("Ensure position and size of actor is at target value when animation playing"); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_WIDTH), targetSizes[1].x, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_HEIGHT), targetSizes[1].y, TEST_LOCATION ); + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::SIZE_DEPTH), targetSizes[1].z, TEST_LOCATION ); + + DALI_TEST_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), targetColors[0], TEST_LOCATION ); + + END_TEST; +} + +int UtcDaliAnimationTimePeriodOrder(void) +{ + tet_infoline("Animate the same property with different time periods and ensure it runs correctly and ends up in the right place" ); + + TestApplication application; + + Actor actor = Actor::New(); + Stage::GetCurrent().Add( actor ); + + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); + + tet_infoline( "With two AnimateTo calls" ); + + Animation animation = Animation::New( 0.0f ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 100.0f, TimePeriod( 3.0f, 1.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 10.0f, TimePeriod( 1.0f, 1.0f ) ); + animation.Play(); + + application.SendNotification(); + application.Render(5000); // After the animation is complete + + DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); + + tet_infoline( "Same animation again but in a different order - should yield the same result" ); + + actor.SetX( 0.0f ); + application.SendNotification(); + application.Render(); + + animation = Animation::New( 0.0f ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 10.0f, TimePeriod( 1.0f, 1.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 100.0f, TimePeriod( 3.0f, 1.0f ) ); + animation.Play(); + + application.SendNotification(); + application.Render(5000); // After the animation is complete + + DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION ); + + tet_infoline( "Now with several AnimateTo calls" ); + + actor.SetX( 0.0f ); + application.SendNotification(); + application.Render(); + + animation = Animation::New( 0.0f ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 1000.0f, TimePeriod( 4.0f, 2.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 145.0f, TimePeriod( 3.0f, 10.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 109.0f, TimePeriod( 1.0f, 1.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 1.0f, TimePeriod( 3.0f, 4.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 200.0f, TimePeriod( 2.0f, 5.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 10.0f, TimePeriod( 10.0f, 2.0f ) ); + animation.Play(); + + application.SendNotification(); + application.Render(14000); // After the animation is complete + + DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); + + tet_infoline( "Same animation again but in a different order - should end up at the same point" ); + + actor.SetX( 0.0f ); + application.SendNotification(); + application.Render(); + + animation = Animation::New( 0.0f ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 200.0f, TimePeriod( 2.0f, 5.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 10.0f, TimePeriod( 10.0f, 2.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 145.0f, TimePeriod( 3.0f, 10.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 1000.0f, TimePeriod( 4.0f, 2.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 1.0f, TimePeriod( 3.0f, 4.0f ) ); + animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 109.0f, TimePeriod( 1.0f, 1.0f ) ); + animation.Play(); + + application.SendNotification(); + application.Render(14000); // After the animation is complete + + DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION ); + END_TEST; }