From: Xiangyin Ma Date: Wed, 12 Nov 2014 16:33:32 +0000 (+0000) Subject: (AutomatedTests) fix test cases X-Git-Tag: dali_1.0.18~7 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=4d383e7b54dba9a7bde8a330b405cd88fc2cf0e9;hp=-c (AutomatedTests) fix test cases [Problem] Test cases fail [Cause] [Solution] fix test cases for CheckBoxButton, CubeTransitionEffect, KeyboardFocusManager, PageTurnView Change-Id: I3227533a3b7d9b5c5ac63a939ef248f79454d64c --- 4d383e7b54dba9a7bde8a330b405cd88fc2cf0e9 diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp index dacff0c..f424000 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp @@ -27,9 +27,9 @@ namespace { static bool gCheckBoxButtonState = false; -bool CheckBoxButtonClicked( Button button ) +bool CheckBoxButtonClicked( Button button, bool state ) { - gCheckBoxButtonState = static_cast( button ).IsChecked(); + gCheckBoxButtonState = state; return true; } @@ -75,7 +75,7 @@ int UtcDaliCheckBoxButtonSetGetChecked(void) tet_infoline(" UtcDaliCheckBoxButtonSetGetChecked"); CheckBoxButton checkBoxButton = CheckBoxButton::New(); - checkBoxButton.ClickedSignal().Connect( &CheckBoxButtonClicked ); + checkBoxButton.ToggledSignal().Connect( &CheckBoxButtonClicked ); // global var used to check if CheckBoxButtonClicked is called; gCheckBoxButtonState = false; diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CubeTransitionEffect.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CubeTransitionEffect.cpp index e584bb4..671e19d 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CubeTransitionEffect.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CubeTransitionEffect.cpp @@ -36,7 +36,7 @@ const Vector2 PAN_DISPLACEMENT1( -5.f, 5.f ); const Vector2 PAN_POSITION2( VIEW_AREA_SIZE.x * 0.25f, VIEW_AREA_SIZE.y * 0.75f ); const Vector2 PAN_DISPLACEMENT2( 5.f, 5.f ); const int RENDER_FRAME_INTERVAL = 16; -static const float ROTATION_EPSILON = 0.0001f; +static const float FLT_EPISILON = 0.0001f; const float OFFSCREEN_RENDER_DURATION = 0.05f; static bool gObjectCreatedCallBackCalled; @@ -388,30 +388,30 @@ int UtcDaliCubeTransitionWaveEffectStartTransition(void) waveEffect.SetTargetImage( imageActor ); waveEffect.StartTransition(true); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); waveEffect.SetTargetImage( imageActor ); waveEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); waveEffect.SetTargetImage( imageActor ); waveEffect.StartTransition(false); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); waveEffect.SetTargetImage( imageActor ); waveEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); END_TEST; } @@ -439,35 +439,36 @@ int UtcDaliCubeTransitionCrossEffectStartTransition(void) crossEffect.SetTargetImage( imageActor ); crossEffect.StartTransition(true); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::XAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + crossEffect.SetTargetImage( imageActor ); crossEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 2.f*Math::PI_2, Vector3::XAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 2.f*Math::PI_2, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); crossEffect.SetTargetImage( imageActor ); crossEffect.StartTransition(false); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::XAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); crossEffect.SetTargetImage( imageActor ); crossEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 0.f, Vector3::XAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 0.f, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); END_TEST; } @@ -494,35 +495,35 @@ int UtcDaliCubeTransitionFoldEffectStartTransition(void) foldEffect.SetTargetImage( imageActor ); foldEffect.StartTransition(true); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); foldEffect.SetTargetImage( imageActor ); foldEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 2.f*Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 2.f*Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); foldEffect.SetTargetImage( imageActor ); foldEffect.StartTransition(false); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(),fullBrightness, FLT_EPISILON, TEST_LOCATION ); foldEffect.SetTargetImage( imageActor ); foldEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2); Wait( application, TRANSITION_DURATION ); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); END_TEST; } @@ -750,9 +751,9 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void) waveEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); waveEffect.SetTargetImage( firstImageActor ); waveEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1); @@ -760,9 +761,9 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void) waveEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); waveEffect.SetTargetImage( secondImageActor ); waveEffect.StartTransition(false); @@ -770,9 +771,9 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void) waveEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); waveEffect.SetTargetImage( firstImageActor ); waveEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2); @@ -780,9 +781,9 @@ int UtcDaliCubeTransitionWaveEffectStopTransition(void) waveEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); END_TEST; } @@ -814,11 +815,11 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void) crossEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::XAXIS), ROTATION_EPSILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); crossEffect.SetTargetImage( firstImageActor ); crossEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1); @@ -826,10 +827,10 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void) crossEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 2.f*Math::PI_2, Vector3::XAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 2.f*Math::PI_2, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); crossEffect.SetTargetImage( secondImageActor ); crossEffect.StartTransition(false); @@ -837,10 +838,10 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void) crossEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::XAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); crossEffect.SetTargetImage( firstImageActor ); crossEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2); @@ -848,10 +849,10 @@ int UtcDaliCubeTransitionCrossEffectStopTransition(void) crossEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 0.f, Vector3::XAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 0.f, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); END_TEST; } @@ -882,10 +883,10 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void) foldEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); foldEffect.SetTargetImage( firstImageActor ); foldEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1); @@ -893,10 +894,10 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void) foldEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 2.f*Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -2.f*Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 2.f*Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); foldEffect.SetTargetImage( secondImageActor ); foldEffect.StartTransition(false); @@ -904,10 +905,10 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void) foldEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == halfBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == fullBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( -Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( Math::PI_2, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); foldEffect.SetTargetImage( firstImageActor ); foldEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2); @@ -915,9 +916,9 @@ int UtcDaliCubeTransitionFoldEffectStopTransition(void) foldEffect.StopTransition(); application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION ); - DALI_TEST_CHECK( cube0.GetChildAt(0).GetCurrentColor() == fullBrightness ); - DALI_TEST_CHECK( cube0.GetChildAt(1).GetCurrentColor() == halfBrightness ); + DALI_TEST_EQUALS( cube1.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetCurrentRotation(), Quaternion( 0.f, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), fullBrightness, FLT_EPISILON, TEST_LOCATION ); + DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), halfBrightness, FLT_EPISILON, TEST_LOCATION ); END_TEST; } diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyboardFocusManager.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyboardFocusManager.cpp index 882d5e7..86d0451 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyboardFocusManager.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyboardFocusManager.cpp @@ -388,7 +388,7 @@ int UtcDaliKeyboardFocusManagerSignalFocusGroupChanged(void) manager.FocusGroupChangedSignal().Connect( &focusGroupChangedCallback, &FocusGroupChangedCallback::Callback ); Integration::KeyEvent tabEvent("Tab", "", 0, 0, 0, Integration::KeyEvent::Down); - Integration::KeyEvent shiftTabEvent("Tab", "", 1, 0, 0, Integration::KeyEvent::Down); + Integration::KeyEvent shiftTabEvent("Tab", "", 0, 1, 0, Integration::KeyEvent::Down); // Send the tab event to change focus group in the forward direction application.ProcessEvent(tabEvent); diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-PageTurnView.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-PageTurnView.cpp index d594aa9..4b314c0 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-PageTurnView.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-PageTurnView.cpp @@ -26,18 +26,6 @@ using namespace Dali; using namespace Dali::Toolkit; -void dali_page_turn_view_startup(void) -{ - test_return_value = TET_UNDEF; -} - -void dali_page_turn_view_cleanup(void) -{ - test_return_value = TET_PASS; -} - - - namespace { const int RENDER_FRAME_INTERVAL = 16; ///< Duration of each frame in ms. (at approx 60FPS) @@ -61,20 +49,14 @@ static void TestCallback(BaseHandle handle) * * @param application Test application instance * @param duration Time to pass in milliseconds. - * @return The actual time passed in milliseconds */ -int Wait(ToolkitTestApplication& application, int duration = 0) +void Wait(ToolkitTestApplication& application, int duration = 0) { - int time = 0; - for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++) { application.SendNotification(); application.Render(RENDER_FRAME_INTERVAL); - time += RENDER_FRAME_INTERVAL; } - - return time; } // Generate a PanGestureEvent to send to Core @@ -256,6 +238,15 @@ private: }// namespace +void dali_page_turn_view_startup(void) +{ + test_return_value = TET_UNDEF; +} + +void dali_page_turn_view_cleanup(void) +{ + test_return_value = TET_PASS; +} int UtcDaliPageTurnPortraitViewNew(void) { @@ -374,6 +365,8 @@ int UtcDaliPageTurnViewEnterLeaveEditMode(void) tet_infoline( " UtcDaliPageTurnViewEnterLeaveEditMode " ); + application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE ); + TestPageFactory factory(application); factory.EnableOffscreenRendering( ); @@ -423,6 +416,8 @@ int UtcDaliPageTurnViewGetHitActor(void) tet_infoline(" UtcDaliPageTurnViewGetHitActor "); + application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE ); + TestPageFactory factory(application); factory.EnableOffscreenRendering( ); @@ -458,6 +453,8 @@ int UtcDaliPageTurnViewRefresh(void) tet_infoline(" UtcDaliPageTurnViewRefresh "); + application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE ); + TestPageFactory factory(application); factory.EnableOffscreenRendering( ); PageTurnView pageTurnView = PageTurnPortraitView::New( factory, PAGE_SIZE ); @@ -496,6 +493,8 @@ int UtcDaliPageTurnViewSignals(void) tet_infoline(" UtcDaliPageTurnViewSignals "); + application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE ); + TestPageFactory factory(application); Vector2 size = Stage::GetCurrent().GetSize(); PageTurnView portraitView = PageTurnPortraitView::New( factory, size );