dali-core
)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER} -O0 -ggdb --coverage -Wall -Werror=return-type")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER} -O0 -ggdb --coverage -Wall -Werror")
FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
Material material = CreateMaterial();
material.RemoveTexture(0);
- DALI_TEST_EQUALS( material.GetNumberOfTextures(), 0, TEST_LOCATION );
+ DALI_TEST_EQUALS( material.GetNumberOfTextures(), 0u, TEST_LOCATION );
material.RemoveTexture(1);
- DALI_TEST_EQUALS( material.GetNumberOfTextures(), 0, TEST_LOCATION );
+ DALI_TEST_EQUALS( material.GetNumberOfTextures(), 0u, TEST_LOCATION );
Sampler sampler = Sampler::New();
sampler.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST );
material.AddTexture( image, "sTexture", sampler );
- DALI_TEST_EQUALS( material.GetNumberOfTextures(), 1, TEST_LOCATION );
+ DALI_TEST_EQUALS( material.GetNumberOfTextures(), 1u, TEST_LOCATION );
material.RemoveTexture(1);
- DALI_TEST_EQUALS( material.GetNumberOfTextures(), 1, TEST_LOCATION );
+ DALI_TEST_EQUALS( material.GetNumberOfTextures(), 1u, TEST_LOCATION );
material.RemoveTexture(0);
- DALI_TEST_EQUALS( material.GetNumberOfTextures(), 0, TEST_LOCATION );
+ DALI_TEST_EQUALS( material.GetNumberOfTextures(), 0u, TEST_LOCATION );
END_TEST;
}
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- int size = 5u;
+ std::size_t size = 5u;
PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat, size );
DALI_TEST_EQUALS( propertyBuffer.GetSize(), size, TEST_LOCATION );
DALI_TEST_EQUALS( propertyBuffer.GetSize(), size, TEST_LOCATION );
*value = values[i].string;
tet_printf("Checking: %s: %s\n", keyName, values[i].string );
X instance = creator( map );
- DALI_TEST_EQUALS( values[i].value, ( instance.*method )(), TEST_LOCATION );
+ DALI_TEST_EQUALS( values[i].value, (int)( instance.*method )(), TEST_LOCATION );
}
}
for ( unsigned int i = 0; i < COLOR_MODE_VALUES_COUNT; ++i )
{
tet_printf( "Checking %s == %d\n", COLOR_MODE_VALUES[i].string, COLOR_MODE_VALUES[i].value );
- DALI_TEST_EQUALS( COLOR_MODE_VALUES[i].value, GetColorMode( COLOR_MODE_VALUES[i].string ), TEST_LOCATION );
+ DALI_TEST_EQUALS( COLOR_MODE_VALUES[i].value, (int)GetColorMode( COLOR_MODE_VALUES[i].string ), TEST_LOCATION );
DALI_TEST_EQUALS( COLOR_MODE_VALUES[i].string, GetColorMode( (ColorMode) COLOR_MODE_VALUES[i].value ), TEST_LOCATION );
}
for ( unsigned int i = 0; i < POSITION_INHERITANCE_MODE_VALUES_COUNT; ++i )
{
tet_printf( "Checking %s == %d\n", POSITION_INHERITANCE_MODE_VALUES[i].string, POSITION_INHERITANCE_MODE_VALUES[i].value );
- DALI_TEST_EQUALS( POSITION_INHERITANCE_MODE_VALUES[i].value, GetPositionInheritanceMode( POSITION_INHERITANCE_MODE_VALUES[i].string ), TEST_LOCATION );
+ DALI_TEST_EQUALS( POSITION_INHERITANCE_MODE_VALUES[i].value, (int)GetPositionInheritanceMode( POSITION_INHERITANCE_MODE_VALUES[i].string ), TEST_LOCATION );
DALI_TEST_EQUALS( POSITION_INHERITANCE_MODE_VALUES[i].string, GetPositionInheritanceMode( (PositionInheritanceMode) POSITION_INHERITANCE_MODE_VALUES[i].value ), TEST_LOCATION );
}
- DALI_TEST_EQUALS( POSITION_INHERITANCE_MODE_VALUES[0].value, GetPositionInheritanceMode("INVALID_ARG"), TEST_LOCATION );
+ DALI_TEST_EQUALS( POSITION_INHERITANCE_MODE_VALUES[0].value, (int)GetPositionInheritanceMode("INVALID_ARG"), TEST_LOCATION );
END_TEST;
}
for ( unsigned int i = 0; i < DRAW_MODE_VALUES_COUNT; ++i )
{
tet_printf( "Checking %s == %d\n", DRAW_MODE_VALUES[i].string, DRAW_MODE_VALUES[i].value );
- DALI_TEST_EQUALS( DRAW_MODE_VALUES[i].value, GetDrawMode( DRAW_MODE_VALUES[i].string ), TEST_LOCATION );
+ DALI_TEST_EQUALS( DRAW_MODE_VALUES[i].value, (int)GetDrawMode( DRAW_MODE_VALUES[i].string ), TEST_LOCATION );
DALI_TEST_EQUALS( DRAW_MODE_VALUES[i].string, GetDrawMode( (DrawMode::Type) DRAW_MODE_VALUES[i].value ), TEST_LOCATION );
}
- DALI_TEST_EQUALS( DRAW_MODE_VALUES[0].value, GetDrawMode( "INVALID_ARG" ), TEST_LOCATION );
+ DALI_TEST_EQUALS( DRAW_MODE_VALUES[0].value, (int)GetDrawMode( "INVALID_ARG" ), TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( image );
ResourceImage resImage = ResourceImage::DownCast( image );
DALI_TEST_CHECK( resImage );
- DALI_TEST_EQUALS( resImage.GetWidth(), 0, TEST_LOCATION );
- DALI_TEST_EQUALS( resImage.GetHeight(), 100, TEST_LOCATION );
+ DALI_TEST_EQUALS( resImage.GetWidth(), 0u, TEST_LOCATION );
+ DALI_TEST_EQUALS( resImage.GetHeight(), 100u, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( image );
ResourceImage resImage = ResourceImage::DownCast( image );
DALI_TEST_CHECK( resImage );
- DALI_TEST_EQUALS( resImage.GetWidth(), 10, TEST_LOCATION );
- DALI_TEST_EQUALS( resImage.GetHeight(), 0, TEST_LOCATION );
+ DALI_TEST_EQUALS( resImage.GetWidth(), 10u, TEST_LOCATION );
+ DALI_TEST_EQUALS( resImage.GetHeight(), 0u, TEST_LOCATION );
END_TEST;
}
map[ "width" ] = (float) 10.0f;
map[ "height" ] = (float) 20.0f;
Image image = NewImage( map );
- DALI_TEST_EQUALS( image.GetWidth(), 10.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( image.GetHeight(), 20.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( image.GetWidth(), 10u, TEST_LOCATION );
+ DALI_TEST_EQUALS( image.GetHeight(), 20u, TEST_LOCATION );
END_TEST;
}
dali-core
)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER} -O0 -ggdb --coverage -Wall -Werror=return-type")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER} -O0 -ggdb --coverage -Wall -Werror")
FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
dali-core
)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER} -O0 -ggdb --coverage -Wall -Werror=return-type")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER} -O0 -ggdb --coverage -Wall -Werror")
FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
return ostream;
}
+void DALI_TEST_EQUALS( const BaseHandle& baseHandle1, const BaseHandle& baseHandle2, const char* location )
+{
+ DALI_TEST_EQUALS< const BaseHandle& >( baseHandle1, baseHandle2, location );
+}
+
+void DALI_TEST_EQUALS( const size_t value1, const unsigned int value2, const char* location )
+{
+ DALI_TEST_EQUALS< unsigned int>( ( unsigned int )( value1 ), value2, location );
+}
+
+void DALI_TEST_EQUALS( const unsigned int value1, const size_t value2, const char* location )
+{
+ DALI_TEST_EQUALS< unsigned int >( value1, ( unsigned int )( value2 ), location );
+}
+
void DALI_TEST_EQUALS( const Matrix3& matrix1, const Matrix3& matrix2, const char* location)
{
const float* m1 = matrix1.AsFloat();
* @param[in] value2 The second value
* @param[in] location The TEST_LOCATION macro should be used here
*/
-template<typename TypeA, typename TypeB>
-inline void DALI_TEST_EQUALS(TypeA value1, TypeB value2, const char* location)
+template<typename Type>
+inline void DALI_TEST_EQUALS(Type value1, Type value2, const char* location)
{
if (!(value1 == value2))
{
}
/**
+ * Test whether two base handles are equal.
+ * @param[in] baseHandle1 The first value
+ * @param[in] baseHandle2 The second value
+ * @param[in] location The TEST_LOCATION macro should be used here
+ */
+void DALI_TEST_EQUALS( const BaseHandle& baseHandle1, const BaseHandle& baseHandle2, const char* location );
+
+/**
+ * Test whether a size_t value and an unsigned int are equal.
+ * @param[in] value1 The first value
+ * @param[in] value2 The second value
+ * @param[in] location The TEST_LOCATION macro should be used here
+ */
+void DALI_TEST_EQUALS( const size_t value1, const unsigned int value2, const char* location );
+
+/**
+ * Test whether an unsigned int and a size_t value and are equal.
+ * @param[in] value1 The first value
+ * @param[in] value2 The second value
+ * @param[in] location The TEST_LOCATION macro should be used here
+ */
+void DALI_TEST_EQUALS( const unsigned int value1, const size_t value2, const char* location );
+
+/**
* Test whether two Matrix3 objects are equal.
* @param[in] matrix1 The first object
* @param[in] matrix2 The second object
// OnRelayout
-static bool gOnRelayoutCallBackCalled = 0;
+static bool gOnRelayoutCallBackCalled = false;
static std::vector< std::string > gActorNamesRelayout;
void OnRelayoutCallback( Actor actor )
{
- ++gOnRelayoutCallBackCalled;
+ gOnRelayoutCallBackCalled = true;
gActorNamesRelayout.push_back( actor.GetName() );
}
TestApplication application;
// Clean test data
- gOnRelayoutCallBackCalled = 0;
+ gOnRelayoutCallBackCalled = false;
gActorNamesRelayout.clear();
Actor actor = Actor::New();
actor.OnRelayoutSignal().Connect( OnRelayoutCallback );
// Sanity check
- DALI_TEST_CHECK( gOnRelayoutCallBackCalled == 0 );
+ DALI_TEST_CHECK( ! gOnRelayoutCallBackCalled );
// Add actor to stage
Stage::GetCurrent().Add( actor );
application.Render();
// OnRelayout emitted
- DALI_TEST_EQUALS( gOnRelayoutCallBackCalled, 1, TEST_LOCATION );
+ DALI_TEST_EQUALS( gOnRelayoutCallBackCalled, true, TEST_LOCATION );
DALI_TEST_EQUALS( "actor", gActorNamesRelayout[ 0 ], TEST_LOCATION );
END_TEST;
DALI_TEST_ASSERT( e, "camera", TEST_LOCATION );
}
- DALI_TEST_EQUALS( (int)cameraType, (int)Dali::Camera::FREE_LOOK, TEST_LOCATION );
+ DALI_TEST_EQUALS( cameraType, Dali::Camera::FREE_LOOK, TEST_LOCATION );
END_TEST;
}
actor.GetProperty( CameraActor::Property::FAR_PLANE_DISTANCE ).Get( value );
DALI_TEST_EQUALS( 4245.f, value, FLOAT_EPSILON, TEST_LOCATION );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
END_TEST;
}
DALI_TEST_EQUALS( nearClippingPlane, actor.GetNearClippingPlane(), FLOAT_EPSILON, TEST_LOCATION );
DALI_TEST_EQUALS( farClippingPlane, actor.GetFarClippingPlane(), FLOAT_EPSILON, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetProjectionMode(), (int)Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
END_TEST;
}
Vector3 pos = actor.GetCurrentPosition();
DALI_TEST_EQUALS( defaultPos.z, pos.z, 0.001f, TEST_LOCATION );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
END_TEST;
}
actor.GetProperty( CameraActor::Property::BOTTOM_PLANE_DISTANCE ).Get( value );
DALI_TEST_EQUALS( 500.0f, value, FLOAT_EPSILON, TEST_LOCATION );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
END_TEST;
}
actor.GetProperty( CameraActor::Property::BOTTOM_PLANE_DISTANCE ).Get( value );
DALI_TEST_EQUALS( 500.0f, value, FLOAT_EPSILON, TEST_LOCATION );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
std::string stringValue;
actor.GetProperty( CameraActor::Property::PROJECTION_MODE ).Get( stringValue );
DALI_TEST_EQUALS( stringValue, "ORTHOGRAPHIC_PROJECTION", TEST_LOCATION );
actor.SetProjectionMode( Dali::Camera::PERSPECTIVE_PROJECTION );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetNearClippingPlane(), 200.0f, FLOAT_EPSILON, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetFarClippingPlane(), 400.0f, FLOAT_EPSILON, TEST_LOCATION );
actor.SetProjectionMode( Dali::Camera::ORTHOGRAPHIC_PROJECTION );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetNearClippingPlane(), 200.0f, FLOAT_EPSILON, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetFarClippingPlane(), 400.0f, FLOAT_EPSILON, TEST_LOCATION );
// Check setting the property.
Property::Value setValue = "PERSPECTIVE_PROJECTION";
actor.SetProperty( CameraActor::Property::PROJECTION_MODE, setValue );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
END_TEST;
}
CameraActor actor = CameraActor::New();
actor.SetOrthographicProjection( Size::ONE );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
actor.SetPerspectiveProjection( Size( 100.f, 150.f ) );
- DALI_TEST_EQUALS( (int)actor.GetProjectionMode(), (int)Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
// Check getting the property.
std::string stringValue;
Actor actor = Actor::New();
Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, &BasicFunction< Vector3 > );
- DALI_TEST_EQUALS( constraint.GetTargetProperty(), Actor::Property::POSITION, TEST_LOCATION );
+ DALI_TEST_EQUALS( constraint.GetTargetProperty(), (Property::Index)Actor::Property::POSITION, TEST_LOCATION );
END_TEST;
}
{
LocalSource source( Actor::Property::POSITION );
- DALI_TEST_EQUALS( source.propertyIndex, Actor::Property::POSITION, TEST_LOCATION );
+ DALI_TEST_EQUALS( source.propertyIndex, (Property::Index)Actor::Property::POSITION, TEST_LOCATION );
END_TEST;
}
{
ParentSource source( Actor::Property::POSITION );
- DALI_TEST_EQUALS( source.propertyIndex, Actor::Property::POSITION, TEST_LOCATION );
+ DALI_TEST_EQUALS( source.propertyIndex, (Property::Index)Actor::Property::POSITION, TEST_LOCATION );
END_TEST;
}
Source source( actor, Actor::Property::SIZE );
DALI_TEST_CHECK( ! source.object );
- DALI_TEST_EQUALS( source.propertyIndex, Actor::Property::SIZE, TEST_LOCATION );
+ DALI_TEST_EQUALS( source.propertyIndex, (Property::Index)Actor::Property::SIZE, TEST_LOCATION );
END_TEST;
}
Source source( actor, Actor::Property::SIZE );
DALI_TEST_EQUALS( source.object, actor, TEST_LOCATION );
- DALI_TEST_EQUALS( source.propertyIndex, Actor::Property::SIZE, TEST_LOCATION );
+ DALI_TEST_EQUALS( source.propertyIndex, (Property::Index)Actor::Property::SIZE, TEST_LOCATION );
END_TEST;
}
ConstraintSource source( Source( actor, Actor::Property::PARENT_ORIGIN ) );
DALI_TEST_CHECK( ! source.object );
- DALI_TEST_EQUALS( source.propertyIndex, Actor::Property::PARENT_ORIGIN, TEST_LOCATION );
+ DALI_TEST_EQUALS( source.propertyIndex, (Property::Index)Actor::Property::PARENT_ORIGIN, TEST_LOCATION );
DALI_TEST_EQUALS( source.sourceType, OBJECT_PROPERTY, TEST_LOCATION );
END_TEST;
ConstraintSource source( Source( actor, Actor::Property::PARENT_ORIGIN ) );
DALI_TEST_EQUALS( source.object, actor, TEST_LOCATION );
- DALI_TEST_EQUALS( source.propertyIndex, Actor::Property::PARENT_ORIGIN, TEST_LOCATION );
+ DALI_TEST_EQUALS( source.propertyIndex, (Property::Index)Actor::Property::PARENT_ORIGIN, TEST_LOCATION );
DALI_TEST_EQUALS( source.sourceType, OBJECT_PROPERTY, TEST_LOCATION );
END_TEST;
ConstraintSource source( LocalSource( Actor::Property::PARENT_ORIGIN ) );
DALI_TEST_CHECK( ! source.object );
- DALI_TEST_EQUALS( source.propertyIndex, Actor::Property::PARENT_ORIGIN, TEST_LOCATION );
+ DALI_TEST_EQUALS( source.propertyIndex, (Property::Index)Actor::Property::PARENT_ORIGIN, TEST_LOCATION );
DALI_TEST_EQUALS( source.sourceType, LOCAL_PROPERTY, TEST_LOCATION );
END_TEST;
ConstraintSource source( ParentSource( Actor::Property::PARENT_ORIGIN ) );
DALI_TEST_CHECK( ! source.object );
- DALI_TEST_EQUALS( source.propertyIndex, Actor::Property::PARENT_ORIGIN, TEST_LOCATION );
+ DALI_TEST_EQUALS( source.propertyIndex, (Property::Index)Actor::Property::PARENT_ORIGIN, TEST_LOCATION );
DALI_TEST_EQUALS( source.sourceType, PARENT_PROPERTY, TEST_LOCATION );
END_TEST;
test_return_value = TET_PASS;
}
-static const float ROTATION_EPSILON = 0.0001f;
-
-
int UtcDaliFrameBufferImageNew01(void)
{
TestApplication application;
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), true, TEST_LOCATION);
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), false, TEST_LOCATION);
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), false, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), (GLenum)GL_FALSE, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), (GLenum)GL_FALSE, TEST_LOCATION);
END_TEST;
}
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), true, TEST_LOCATION);
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), true, TEST_LOCATION);
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), false, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), (GLenum)GL_FALSE, TEST_LOCATION);
END_TEST;
}
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), true, TEST_LOCATION);
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), false, TEST_LOCATION);
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), true, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), (GLenum)GL_FALSE, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
END_TEST;
}
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), true, TEST_LOCATION);
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), true, TEST_LOCATION);
- DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), true, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferColorAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferDepthAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
+ DALI_TEST_EQUALS(application.GetGlAbstraction().CheckFramebufferStencilAttachment(), (GLenum)GL_TRUE, TEST_LOCATION);
END_TEST;
}
array->PushBack( "a string" );
array->PushBack( Property::Value( Vector3(1,2,3) ) );
- DALI_TEST_EQUALS( 3, array->Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( 3u, array->Count(), TEST_LOCATION );
Property::Index propertyIndex = actor.RegisterProperty( "composite", value, Property::READ_WRITE );
TestApplication application; // Reset all test adapter return codes
KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
- DALI_TEST_EQUALS(true, event.IsCtrlModifier() & event.IsShiftModifier(), TEST_LOCATION);
+ DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() & event.IsShiftModifier()), TEST_LOCATION);
event.keyModifier = SHIFT_MODIFIER;
- DALI_TEST_EQUALS(false, event.IsCtrlModifier() & event.IsShiftModifier(), TEST_LOCATION);
+ DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsShiftModifier()), TEST_LOCATION);
END_TEST;
}
TestApplication application; // Reset all test adapter return codes
KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
- DALI_TEST_EQUALS(true, event.IsCtrlModifier() | event.IsAltModifier(), TEST_LOCATION);
+ DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() | event.IsAltModifier()), TEST_LOCATION);
event.keyModifier = SHIFT_MODIFIER;
- DALI_TEST_EQUALS(false, event.IsCtrlModifier() & event.IsAltModifier(), TEST_LOCATION);
+ DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsAltModifier()), TEST_LOCATION);
END_TEST;
}
TestApplication application; // Reset all test adapter return codes
KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
- DALI_TEST_EQUALS(true, event.IsCtrlModifier() | event.IsAltModifier(), TEST_LOCATION);
+ DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() | event.IsAltModifier()), TEST_LOCATION);
event.keyModifier = SHIFT_MODIFIER;
- DALI_TEST_EQUALS(false, event.IsCtrlModifier() & event.IsAltModifier(), TEST_LOCATION);
+ DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsAltModifier()), TEST_LOCATION);
END_TEST;
}
DALI_TEST_CHECK( keyEvent.keyString == std::string() );
DALI_TEST_EQUALS( keyEvent.keyCode, -1, TEST_LOCATION );
DALI_TEST_EQUALS( keyEvent.keyModifier, 0, TEST_LOCATION );
- DALI_TEST_EQUALS( keyEvent.time, 0u, TEST_LOCATION );
+ DALI_TEST_EQUALS( keyEvent.time, 0lu, TEST_LOCATION );
DALI_TEST_EQUALS( keyEvent.state, Integration::KeyEvent::Down, TEST_LOCATION);
}
application.Render();
DALI_TEST_EQUALS( testBox.x, glScissorParams.x, TEST_LOCATION );
- DALI_TEST_EQUALS( testBox.y, stage.GetSize().height - glScissorParams.y - testBox.height, TEST_LOCATION ); // GL Coordinates are from bottom left
+ DALI_TEST_EQUALS( testBox.y, (int)(stage.GetSize().height - glScissorParams.y - testBox.height), TEST_LOCATION ); // GL Coordinates are from bottom left
DALI_TEST_EQUALS( testBox.width, glScissorParams.width, TEST_LOCATION );
DALI_TEST_EQUALS( testBox.height, glScissorParams.height, TEST_LOCATION );
END_TEST;
int UtcDaliPropertyMapInsertP(void)
{
Property::Map map;
- DALI_TEST_EQUALS( 0, map.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( 0u, map.Count(), TEST_LOCATION );
map.Insert( "foo", "bar");
- DALI_TEST_EQUALS( 1, map.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( 1u, map.Count(), TEST_LOCATION );
Property::Value* value = map.Find( "foo" );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( "bar", value->Get<std::string>(), TEST_LOCATION );
map.Insert( std::string("foo2"), "testing" );
- DALI_TEST_EQUALS( 2, map.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( 2u, map.Count(), TEST_LOCATION );
value = map.Find( "foo2" );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( "testing", value->Get<std::string>(), TEST_LOCATION );
GreaterThanCondition(100.0f));
Property::Index targetProperty = notification.GetTargetProperty();
- DALI_TEST_EQUALS( targetProperty, Actor::Property::POSITION_X, TEST_LOCATION );
+ DALI_TEST_EQUALS( targetProperty, (Property::Index)Actor::Property::POSITION_X, TEST_LOCATION );
END_TEST;
}
Property::Value value;
AngleAxis b = value.Get<AngleAxis>();
AngleAxis result;
- DALI_TEST_EQUALS( 0.f, b.angle, TEST_LOCATION );
+ DALI_TEST_EQUALS( (Radian)0.f, b.angle, TEST_LOCATION );
DALI_TEST_EQUALS( Vector3::ZERO, b.axis, TEST_LOCATION );
DALI_TEST_EQUALS( false, value.Get( result ), TEST_LOCATION );
DALI_TEST_EQUALS( AngleAxis(), result, TEST_LOCATION );
Property::Array result;
result.PushBack( Property::Value( 10 ) );
DALI_TEST_EQUALS( false, value.Get( result ), TEST_LOCATION );
- DALI_TEST_EQUALS( 1, result.Count(), TEST_LOCATION ); // array is not modified
+ DALI_TEST_EQUALS( 1u, result.Count(), TEST_LOCATION ); // array is not modified
Property::Value value2("");
DALI_TEST_EQUALS( false, value2.Get( result ), TEST_LOCATION );
- DALI_TEST_EQUALS( 1, result.Count(), TEST_LOCATION ); // array is not modified
+ DALI_TEST_EQUALS( 1u, result.Count(), TEST_LOCATION ); // array is not modified
END_TEST;
}
{
Property::Value value;
DALI_TEST_CHECK( NULL == value.GetMap() );
- DALI_TEST_EQUALS( 0, value.Get<Property::Map>().Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( 0u, value.Get<Property::Map>().Count(), TEST_LOCATION );
Property::Map result;
result.Insert("key", "value" );
DALI_TEST_EQUALS( false, value.Get( result ), TEST_LOCATION );
- DALI_TEST_EQUALS( 1, result.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( 1u, result.Count(), TEST_LOCATION );
Property::Value value2("");
DALI_TEST_EQUALS( false, value2.Get( result ), TEST_LOCATION );
- DALI_TEST_EQUALS( 1, result.Count(), TEST_LOCATION ); // array is not modified
+ DALI_TEST_EQUALS( 1u, result.Count(), TEST_LOCATION ); // array is not modified
END_TEST;
}
DALI_TEST_CHECK( lastSyncObj != NULL );
application.Render();
- DALI_TEST_EQUALS( (application.GetUpdateStatus() & Integration::KeepUpdating::RENDER_TASK_SYNC), Integration::KeepUpdating::RENDER_TASK_SYNC, TEST_LOCATION );
+ DALI_TEST_EQUALS( (Integration::KeepUpdating::Reasons)(application.GetUpdateStatus() & Integration::KeepUpdating::RENDER_TASK_SYNC), Integration::KeepUpdating::RENDER_TASK_SYNC, TEST_LOCATION );
application.SendNotification();
DALI_TEST_CHECK( !finished );
application.Render();
- DALI_TEST_EQUALS( (application.GetUpdateStatus() & Integration::KeepUpdating::RENDER_TASK_SYNC), Integration::KeepUpdating::RENDER_TASK_SYNC, TEST_LOCATION );
+ DALI_TEST_EQUALS( (Integration::KeepUpdating::Reasons)(application.GetUpdateStatus() & Integration::KeepUpdating::RENDER_TASK_SYNC), Integration::KeepUpdating::RENDER_TASK_SYNC, TEST_LOCATION );
application.SendNotification();
DALI_TEST_CHECK( ! finished );
DALI_TEST_CHECK( lastSyncObj != NULL );
application.Render();
- DALI_TEST_EQUALS( (application.GetUpdateStatus() & Integration::KeepUpdating::RENDER_TASK_SYNC), Integration::KeepUpdating::RENDER_TASK_SYNC, TEST_LOCATION );
+ DALI_TEST_EQUALS( (Integration::KeepUpdating::Reasons)(application.GetUpdateStatus() & Integration::KeepUpdating::RENDER_TASK_SYNC), Integration::KeepUpdating::RENDER_TASK_SYNC, TEST_LOCATION );
application.SendNotification();
DALI_TEST_CHECK( !finished );
application.Render();
- DALI_TEST_EQUALS( (application.GetUpdateStatus() & Integration::KeepUpdating::RENDER_TASK_SYNC), Integration::KeepUpdating::RENDER_TASK_SYNC, TEST_LOCATION );
+ DALI_TEST_EQUALS( (Integration::KeepUpdating::Reasons)(application.GetUpdateStatus() & Integration::KeepUpdating::RENDER_TASK_SYNC), Integration::KeepUpdating::RENDER_TASK_SYNC, TEST_LOCATION );
application.SendNotification();
DALI_TEST_CHECK( ! finished );
using namespace Dali;
+namespace
+{
+/// Compare a uint16_t value with an unsigned int
+void DALI_TEST_EQUALS( uint16_t value1, unsigned int value2, const char* location )
+{
+ ::DALI_TEST_EQUALS< uint16_t >( value1, static_cast< uint16_t >( value2 ), location );
+}
+} // unnamed namespace
int UtcDaliUint16PairConstructor01P(void)
{
namespace
{
const Dali::VectorBase::SizeType ZERO(0);
+
+/// Compare a short with an int
+void DALI_TEST_EQUALS( short value1, int value2, const char* location )
+{
+ ::DALI_TEST_EQUALS< short >( value1, static_cast< short >( value2 ), location );
+}
+
+/// Compare a char with an int
+void DALI_TEST_EQUALS( char value1, int value2, const char* location )
+{
+ ::DALI_TEST_EQUALS< char >( value1, static_cast< char >( value2 ), location );
}
+} // unnamed namespace
+
int UtcDaliEmptyVectorInt(void)
{
tet_infoline("Testing Dali::Vector<int>");
try
{
float& w = testVector[4];
+ (void)w; // Suppress unused variable warning
tet_result(TET_FAIL);
}
catch (Dali::DaliException& e)
try
{
const float& w = testVector2[4];
+ (void)w; // Suppress unused variable warning
tet_result(TET_FAIL);
}
catch (Dali::DaliException& e)
try
{
float& w = testVector[4];
+ (void)w; // Suppress unused variable warning
tet_result(TET_FAIL);
}
catch (Dali::DaliException& e)
try
{
const float& w = testVector2[4];
+ (void)w; // Suppress unused variable warning
tet_result(TET_FAIL);
}
catch (Dali::DaliException& e)
try
{
float& w = testVector[4];
+ (void)w; // Suppress unused variable warning
tet_result(TET_FAIL);
}
catch (Dali::DaliException& e)
try
{
const float& w = testVector2[4];
+ (void)w; // Suppress unused variable warning
tet_result(TET_FAIL);
}
catch (Dali::DaliException& e)