int UtcDaliPushButtonConstructorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
PushButton button;
int UtcDaliPushButtonCopyConstructorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
// Initialize an object, ref count == 1
PushButton button = PushButton::New();
END_TEST;
}
+int UtcDaliPushButtonMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ PushButton button = PushButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, true );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+ PushButton moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliPushButtonAssignmentOperatorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
PushButton button = PushButton::New();
END_TEST;
}
+int UtcDaliPushButtonMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ PushButton button = PushButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, true );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+ PushButton moved;
+ moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliPushButtonNewP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
PushButton button = PushButton::New();
int UtcDaliPushButtonDownCastP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
PushButton button = PushButton::New();
int UtcDaliPushButtonDownCastN(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
BaseHandle unInitializedObject;