[Problem] Test cases fail
[Cause]
[Solution] fix test cases for CheckBoxButton,
CubeTransitionEffect,
KeyboardFocusManager,
PageTurnView
Change-Id: I3227533a3b7d9b5c5ac63a939ef248f79454d64c
{
static bool gCheckBoxButtonState = false;
{
static bool gCheckBoxButtonState = false;
-bool CheckBoxButtonClicked( Button button )
+bool CheckBoxButtonClicked( Button button, bool state )
- gCheckBoxButtonState = static_cast<CheckBoxButton&>( button ).IsChecked();
+ gCheckBoxButtonState = state;
tet_infoline(" UtcDaliCheckBoxButtonSetGetChecked");
CheckBoxButton checkBoxButton = CheckBoxButton::New();
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;
// global var used to check if CheckBoxButtonClicked is called;
gCheckBoxButtonState = false;
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;
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;
const float OFFSCREEN_RENDER_DURATION = 0.05f;
static bool gObjectCreatedCallBackCalled;
waveEffect.SetTargetImage( imageActor );
waveEffect.StartTransition(true);
Wait( application, TRANSITION_DURATION );
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 );
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 );
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 );
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 );
crossEffect.SetTargetImage( imageActor );
crossEffect.StartTransition(true);
Wait( application, TRANSITION_DURATION );
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 );
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 );
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 );
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 );
foldEffect.SetTargetImage( imageActor );
foldEffect.StartTransition(true);
Wait( application, TRANSITION_DURATION );
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 );
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 );
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 );
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 );
waveEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
waveEffect.SetTargetImage( firstImageActor );
waveEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
waveEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
waveEffect.SetTargetImage( secondImageActor );
waveEffect.StartTransition(false);
waveEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
waveEffect.SetTargetImage( firstImageActor );
waveEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
waveEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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 );
crossEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
crossEffect.SetTargetImage( firstImageActor );
crossEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
crossEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
crossEffect.SetTargetImage( secondImageActor );
crossEffect.StartTransition(false);
crossEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
crossEffect.SetTargetImage( firstImageActor );
crossEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
crossEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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 );
foldEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
foldEffect.SetTargetImage( firstImageActor );
foldEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
foldEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
foldEffect.SetTargetImage( secondImageActor );
foldEffect.StartTransition(false);
foldEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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);
foldEffect.SetTargetImage( firstImageActor );
foldEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
foldEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
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 );
manager.FocusGroupChangedSignal().Connect( &focusGroupChangedCallback, &FocusGroupChangedCallback::Callback );
Integration::KeyEvent tabEvent("Tab", "", 0, 0, 0, Integration::KeyEvent::Down);
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);
// Send the tab event to change focus group in the forward direction
application.ProcessEvent(tabEvent);
using namespace Dali;
using namespace Dali::Toolkit;
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)
namespace
{
const int RENDER_FRAME_INTERVAL = 16; ///< Duration of each frame in ms. (at approx 60FPS)
*
* @param application Test application instance
* @param duration Time to pass in milliseconds.
*
* @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)
for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++)
{
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++)
{
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- time += RENDER_FRAME_INTERVAL;
}
// Generate a PanGestureEvent to send to Core
}
// Generate a PanGestureEvent to send to Core
+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)
{
int UtcDaliPageTurnPortraitViewNew(void)
{
tet_infoline( " UtcDaliPageTurnViewEnterLeaveEditMode " );
tet_infoline( " UtcDaliPageTurnViewEnterLeaveEditMode " );
+ application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
+
TestPageFactory factory(application);
factory.EnableOffscreenRendering( );
TestPageFactory factory(application);
factory.EnableOffscreenRendering( );
tet_infoline(" UtcDaliPageTurnViewGetHitActor ");
tet_infoline(" UtcDaliPageTurnViewGetHitActor ");
+ application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
+
TestPageFactory factory(application);
factory.EnableOffscreenRendering( );
TestPageFactory factory(application);
factory.EnableOffscreenRendering( );
tet_infoline(" UtcDaliPageTurnViewRefresh ");
tet_infoline(" UtcDaliPageTurnViewRefresh ");
+ application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
+
TestPageFactory factory(application);
factory.EnableOffscreenRendering( );
PageTurnView pageTurnView = PageTurnPortraitView::New( factory, PAGE_SIZE );
TestPageFactory factory(application);
factory.EnableOffscreenRendering( );
PageTurnView pageTurnView = PageTurnPortraitView::New( factory, PAGE_SIZE );
tet_infoline(" UtcDaliPageTurnViewSignals ");
tet_infoline(" UtcDaliPageTurnViewSignals ");
+ application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
+
TestPageFactory factory(application);
Vector2 size = Stage::GetCurrent().GetSize();
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
TestPageFactory factory(application);
Vector2 size = Stage::GetCurrent().GetSize();
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );