Merge "(Control) Remove virtual inlines, better arrange source file & remove one...
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Thu, 13 Nov 2014 12:43:16 +0000 (04:43 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 13 Nov 2014 12:43:16 +0000 (04:43 -0800)
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
base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
docs/content/programming-guide/dali-application.h
optional/dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index dacff0c..f424000 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 e584bb4..671e19d 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 882d5e7..86d0451 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 d594aa9..4b314c0 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 );
index 5007fdc..03f9d38 100644 (file)
@@ -188,6 +188,11 @@ unsigned int DefaultRuler::GetTotalPages() const
 FixedRuler::FixedRuler(float spacing)
 : mSpacing(spacing)
 {
+  if(fabsf(mSpacing) <= Math::MACHINE_EPSILON_1)
+  {
+    DALI_LOG_ERROR( "Page spacing too small (%f).", double(spacing) );
+    mSpacing = spacing >= 0.0f ? Math::MACHINE_EPSILON_1 : -Math::MACHINE_EPSILON_1;
+  }
   mType = Fixed;
 }
 
@@ -203,7 +208,7 @@ float FixedRuler::GetPositionFromPage(unsigned int page, unsigned int &volume, b
   volume = 0;
 
   // spacing must be present.
-  if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1)
+  if( mEnabled )
   {
     unsigned int column = page;
 
@@ -237,7 +242,7 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const
   unsigned int page = 0;
 
   // spacing must be present.
-  if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1)
+  if( mEnabled )
   {
     if( wrap )
     {
@@ -248,6 +253,12 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const
     if(wrap)
     {
       unsigned int pagesPerVolume = mDomain.GetSize() / mSpacing;
+      // Defensive check to avoid a divide by zero below when the ruler is in an invalid state (entire domain smaller than spacing between pages of it):
+      if(pagesPerVolume < 1u)
+      {
+        pagesPerVolume = 1u;
+        DALI_LOG_ERROR("Ruler domain(%f) is smaller than its spacing(%f).", mDomain.GetSize() * 1.0, mSpacing * 1.0 );
+      }
       page %= pagesPerVolume;
     }
   }
@@ -260,7 +271,7 @@ unsigned int FixedRuler::GetTotalPages() const
   unsigned int pagesPerVolume = 1;
 
   // spacing must be present.
-  if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1)
+  if( mEnabled )
   {
     pagesPerVolume = mDomain.GetSize() / mSpacing;
   }
index 99df999..c17b910 100644 (file)
@@ -18,8 +18,8 @@ void CreateProgram(Application& app)
 
 int main (int argc, char **argv)
 {
-  Application app = Application::New(argc, argv);
-  app.SignalInit().Connect(&CreateProgram);
+  Application app = Application::New(&argc, &argv);
+  app.InitSignal().Connect(&CreateProgram);
   app.MainLoop();
 }
 @endcode
index b0849b0..e872060 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 16;
+const unsigned int TOOLKIT_MICRO_VERSION = 17;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index deabf5c..00e35a7 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    The OpenGLES Canvas Core Library Toolkit
-Version:    1.0.16
+Version:    1.0.17
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0