From: Sunghyun kim Date: Fri, 25 Oct 2019 08:30:37 +0000 (+0900) Subject: [UTC][dali-core][Non-ACR][Fix Clear Animation test] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0bcd690c0ed83935e3f8caaa9dcbbd1dee21955;p=test%2Ftct%2Fnative%2Fapi.git [UTC][dali-core][Non-ACR][Fix Clear Animation test] Existing test for animation can fail depending on the timing. Therefore, TC was modified so that it could do more clear test. Change-Id: Ica4a1f196f52a136c9c6986fd47cda04ad097175 --- diff --git a/src/utc/dali-core/animation/utc-dali-animation-impl.h b/src/utc/dali-core/animation/utc-dali-animation-impl.h index a752dbee5..6f950af1d 100755 --- a/src/utc/dali-core/animation/utc-dali-animation-impl.h +++ b/src/utc/dali-core/animation/utc-dali-animation-impl.h @@ -18,6 +18,7 @@ int gIntAnimDefaultStart = 10; int gIntAnimDefaultTarget = 50; bool gBoolAnimStart(false); Vector3 gVec3Progress; +Vector3 gVec3ProgressNext; Vector3 gVec3TargetPosition(10.0f, 10.0f, 10.0f); Property::Index gAnimPropertyIndex; const bool gBoolAnimRelativeValue(true); @@ -724,7 +725,12 @@ void VTAnimationClear001() void VTAnimationClear002() { DALI_CHECK_FAIL( gBoolSignalReceived, " Signal is received which is unexpected after clear."); - DALI_CHECK_FAIL( gVec3Progress != gActorAnim.GetCurrentPosition(), + gVec3ProgressNext = gActorAnim.GetCurrentPosition(); + bool bIsInProgress = ( gVec3ProgressNext.x >= gVec3Progress.x && gVec3ProgressNext.x < gVec3TargetPosition.x ) && + ( gVec3ProgressNext.y >= gVec3Progress.y && gVec3ProgressNext.y < gVec3TargetPosition.y ) && + ( gVec3ProgressNext.z >= gVec3Progress.z && gVec3ProgressNext.z < gVec3TargetPosition.z ) ; + + DALI_CHECK_FAIL( !bIsInProgress, "Actor's property should be still within the progress value due to clearing the animation before animation time." ); Stage::GetCurrent().Remove(gActorAnim);