-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
#include <iostream>
#include <stdlib.h>
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;
DALI_TEST_CHECK( waveEffect );
- waveEffect = NULL;
+ waveEffect.Reset();
//Additional check to ensure object is created by checking if it's registered
ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
DALI_TEST_CHECK( crossEffect );
- crossEffect = NULL;
+ crossEffect.Reset();
//Additional check to ensure object is created by checking if it's registered
ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
DALI_TEST_CHECK( foldEffect );
- foldEffect = NULL;
+ foldEffect.Reset();
//Additional check to ensure object is created by checking if it is registered
ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
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;
}
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;
}
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;
}
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.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.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.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;
}
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.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.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.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;
}
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.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.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.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;
}