(AutomatedTests) fix test cases 20/30220/2
authorXiangyin Ma <x1.ma@samsung.com>
Wed, 12 Nov 2014 16:33:32 +0000 (16:33 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 13 Nov 2014 08:01:45 +0000 (00:01 -0800)
[Problem] Test cases fail

[Cause]

[Solution] fix test cases for CheckBoxButton,
                              CubeTransitionEffect,
                              KeyboardFocusManager,
                              PageTurnView

Change-Id: I3227533a3b7d9b5c5ac63a939ef248f79454d64c

automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CheckBoxButton.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-CubeTransitionEffect.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyboardFocusManager.cpp
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-PageTurnView.cpp

index dacff0c7d8fb698485ebc2c8daabf74c04ff2f64..f424000561cd33696d934b03efadae396e415564 100644 (file)
@@ -27,9 +27,9 @@ namespace
 {
 
 static bool gCheckBoxButtonState = false;
-bool CheckBoxButtonClicked( Button button )
+bool CheckBoxButtonClicked( Button button, bool state )
 {
-  gCheckBoxButtonState = static_cast<CheckBoxButton&>( 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;
index e584bb44c32bbc8717f7363dd6527635c32e69a3..671e19d3ee560c7ef464414e42f6a5298c16cd76 100644 (file)
@@ -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;
 }
index 882d5e77c99c29bc9a6cfcd9ba3446226807f1a4..86d0451d99396c21f5715fda244ada617ff5743a 100644 (file)
@@ -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);
index d594aa9db649d2648c49520f2cdf738958db6f9e..4b314c08271cd428922675c7dfa5a9d542f54cfa 100644 (file)
 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 );