/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
*
*/
-#include <iostream>
-#include <stdlib.h>
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <dali/integration-api/events/touch-event-integ.h>
#include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
-
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <stdlib.h>
+#include <iostream>
using namespace Dali;
using namespace Dali::Toolkit;
static const char* TEST_IMAGE_THREE = TEST_RESOURCE_DIR "/popup_tail_down.png";
static const char* TEST_IMAGE_FOUR = TEST_RESOURCE_DIR "/popup_tail_up.png";
-static const Vector2 INSIDE_TOUCH_POINT_POSITON = Vector2( 240, 400 );
-static const Vector3 BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS = Vector3( 200, 360, 0 );
-static const Size BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS = Size( 100, 100 );
+static const Vector2 INSIDE_TOUCH_POINT_POSITON = Vector2(240, 400);
+static const Vector3 BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS = Vector3(200, 360, 0);
+static const Size BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS = Size(100, 100);
static bool gObjectCreatedCallBackCalled;
Dali::Integration::Point GetPointDownInside()
{
Dali::Integration::Point point;
- point.SetState( PointState::DOWN );
- point.SetScreenPosition( INSIDE_TOUCH_POINT_POSITON );
+ point.SetState(PointState::DOWN);
+ point.SetScreenPosition(INSIDE_TOUCH_POINT_POSITON);
return point;
}
Dali::Integration::Point GetPointUpInside()
{
Dali::Integration::Point point;
- point.SetState( PointState::UP );
- point.SetScreenPosition( INSIDE_TOUCH_POINT_POSITON );
+ point.SetState(PointState::UP);
+ point.SetScreenPosition(INSIDE_TOUCH_POINT_POSITON);
return point;
}
-}
+} // namespace
int UtcDaliToggleButtonConstructorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
tet_infoline(" UtcDaliToggleButtonConstructorP");
ToggleButton button;
- DALI_TEST_CHECK( !button );
+ DALI_TEST_CHECK(!button);
END_TEST;
}
int UtcDaliToggleButtonCopyConstructorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
tet_infoline(" UtcDaliToggleButtonCopyConstructorP");
// Initialize an object, ref count == 1
ToggleButton button = ToggleButton::New();
- ToggleButton copy( button );
- DALI_TEST_CHECK( copy );
+ ToggleButton copy(button);
+ DALI_TEST_CHECK(copy);
END_TEST;
}
int UtcDaliToggleButtonAssignmentOperatorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
tet_infoline(" UtcDaliToggleButtonAssignmentOperatorP");
ToggleButton button = ToggleButton::New();
- ToggleButton copy( button );
- DALI_TEST_CHECK( copy );
+ ToggleButton copy(button);
+ DALI_TEST_CHECK(copy);
- DALI_TEST_CHECK( button == copy );
+ DALI_TEST_CHECK(button == copy);
END_TEST;
}
// Create the Slider actor
ToggleButton toggleButton;
- DALI_TEST_CHECK( !toggleButton );
+ DALI_TEST_CHECK(!toggleButton);
toggleButton = ToggleButton::New();
- DALI_TEST_CHECK( toggleButton );
+ DALI_TEST_CHECK(toggleButton);
ToggleButton toggleButton2(toggleButton);
- DALI_TEST_CHECK( toggleButton2 == toggleButton );
+ DALI_TEST_CHECK(toggleButton2 == toggleButton);
//Additional check to ensure object is created by checking if it's registered
- ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
- DALI_TEST_CHECK( registry );
+ ObjectRegistry registry = application.GetCore().GetObjectRegistry();
+ DALI_TEST_CHECK(registry);
gObjectCreatedCallBackCalled = false;
- registry.ObjectCreatedSignal().Connect( &TestCallback );
+ registry.ObjectCreatedSignal().Connect(&TestCallback);
{
ToggleButton toggleButton = ToggleButton::New();
}
- DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
+ DALI_TEST_CHECK(gObjectCreatedCallBackCalled);
END_TEST;
}
ToggleButton* toggleButton = new ToggleButton();
delete toggleButton;
- DALI_TEST_CHECK( true );
+ DALI_TEST_CHECK(true);
END_TEST;
}
ToolkitTestApplication application;
tet_infoline("UtcDaliToggleButtonDownCast");
- Handle handle = ToggleButton::New();
- ToggleButton toggleButton = ToggleButton::DownCast( handle );
+ Handle handle = ToggleButton::New();
+ ToggleButton toggleButton = ToggleButton::DownCast(handle);
- DALI_TEST_CHECK( toggleButton == handle );
+ DALI_TEST_CHECK(toggleButton == handle);
END_TEST;
}
int UtcDaliToggleButtonToggleStatesProperty(void)
{
- ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
+ ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
tet_infoline(" UtcDaliToggleButtonToggleStatesProperty");
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
- toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
+ application.GetScene().Add(toggleButton);
+ toggleButton.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty(Actor::Property::ANCHOR_POINT, ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty(Actor::Property::POSITION, Vector2(0.0f, 0.0f));
- {// Check empty array
+ { // Check empty array
Property::Array toggleIcons;
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons);
application.SendNotification();
application.Render();
Property::Array resultIcons;
- resultIcons = toggleButton.GetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS ).Get<Property::Array>();
- DALI_TEST_CHECK( resultIcons.Count() == 0 );
+ resultIcons = toggleButton.GetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS).Get<Property::Array>();
+ DALI_TEST_CHECK(resultIcons.Count() == 0);
}
- {// Check non-empty Array
+ { // Check non-empty Array
Property::Array toggleIcons;
- toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
- toggleIcons.PushBack( TEST_IMAGE_TWO );
- toggleIcons.PushBack( TEST_IMAGE_THREE );
- toggleIcons.PushBack( TEST_IMAGE_FOUR );
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+ toggleIcons.PushBack(TEST_IMAGE_ONE); //Icons path
+ toggleIcons.PushBack(TEST_IMAGE_TWO);
+ toggleIcons.PushBack(TEST_IMAGE_THREE);
+ toggleIcons.PushBack(TEST_IMAGE_FOUR);
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons);
application.SendNotification();
application.Render();
Property::Array resultIcons;
- resultIcons = toggleButton.GetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS ).Get<Property::Array>();
+ resultIcons = toggleButton.GetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS).Get<Property::Array>();
// Check that the result is the same as
- DALI_TEST_EQUALS( toggleIcons.Count(), resultIcons.Count(), TEST_LOCATION );
- DALI_TEST_CHECK( toggleIcons[0].Get<std::string>() == resultIcons[0].Get<std::string>() );
- DALI_TEST_CHECK( toggleIcons[1].Get<std::string>() == resultIcons[1].Get<std::string>() );
- DALI_TEST_CHECK( toggleIcons[2].Get<std::string>() == resultIcons[2].Get<std::string>() );
- DALI_TEST_CHECK( toggleIcons[3].Get<std::string>() == resultIcons[3].Get<std::string>() );
+ DALI_TEST_EQUALS(toggleIcons.Count(), resultIcons.Count(), TEST_LOCATION);
+ DALI_TEST_CHECK(toggleIcons[0].Get<std::string>() == resultIcons[0].Get<std::string>());
+ DALI_TEST_CHECK(toggleIcons[1].Get<std::string>() == resultIcons[1].Get<std::string>());
+ DALI_TEST_CHECK(toggleIcons[2].Get<std::string>() == resultIcons[2].Get<std::string>());
+ DALI_TEST_CHECK(toggleIcons[3].Get<std::string>() == resultIcons[3].Get<std::string>());
}
- {// Check property::map
+ { // Check property::map
Property::Map propertyMap1;
- Vector4 testColor1( 1.f, 0.5f, 0.3f, 0.2f );
- propertyMap1.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
- propertyMap1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, testColor1);
+ Vector4 testColor1(1.f, 0.5f, 0.3f, 0.2f);
+ propertyMap1.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
+ propertyMap1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, testColor1);
Property::Map propertyMap2;
- Vector4 testColor2( 0.5f, 1.f, 0.3f, 0.2f );
- propertyMap2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
- propertyMap2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, testColor2);
+ Vector4 testColor2(0.5f, 1.f, 0.3f, 0.2f);
+ propertyMap2.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
+ propertyMap2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, testColor2);
Property::Map propertyMap3;
- Vector4 testColor3( 1.f, 0.5f, 1.f, 0.2f );
- propertyMap3.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
- propertyMap3.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, testColor3);
+ Vector4 testColor3(1.f, 0.5f, 1.f, 0.2f);
+ propertyMap3.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
+ propertyMap3.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, testColor3);
Property::Array toggleMaps;
- toggleMaps.Add( propertyMap1 );
- toggleMaps.Add( propertyMap2 );
- toggleMaps.Add( propertyMap3 );
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleMaps );
+ toggleMaps.Add(propertyMap1);
+ toggleMaps.Add(propertyMap2);
+ toggleMaps.Add(propertyMap3);
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS, toggleMaps);
application.SendNotification();
application.Render();
Property::Array resultMaps;
- resultMaps = toggleButton.GetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS ).Get<Property::Array>();
+ resultMaps = toggleButton.GetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS).Get<Property::Array>();
// Check that the result
- DALI_TEST_EQUALS( toggleMaps.Count(), resultMaps.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS(toggleMaps.Count(), resultMaps.Count(), TEST_LOCATION);
}
END_TEST;
}
-int UtcDaliToggleButtonToggleTipsProperty( void )
+int UtcDaliToggleButtonToggleTipsProperty(void)
{
- ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
+ ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
tet_infoline(" UtcDaliToggleButtonToggleTipsProperty");
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
- toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
+ application.GetScene().Add(toggleButton);
+ toggleButton.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty(Actor::Property::ANCHOR_POINT, ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty(Actor::Property::POSITION, Vector2(0.0f, 0.0f));
{ // Check empty tip array
Property::Array toggleIcons;
- toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
- toggleIcons.PushBack( TEST_IMAGE_TWO );
- toggleIcons.PushBack( TEST_IMAGE_THREE );
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+ toggleIcons.PushBack(TEST_IMAGE_ONE); //Icons path
+ toggleIcons.PushBack(TEST_IMAGE_TWO);
+ toggleIcons.PushBack(TEST_IMAGE_THREE);
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons);
Property::Array toggleTips;
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips );
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips);
application.SendNotification();
application.Render();
Property::Array resultTips;
- resultTips = toggleButton.GetProperty( Toolkit::ToggleButton::Property::TOOLTIPS ).Get<Property::Array>();
- DALI_TEST_CHECK( resultTips.Count() == 0 );
+ resultTips = toggleButton.GetProperty(Toolkit::ToggleButton::Property::TOOLTIPS).Get<Property::Array>();
+ DALI_TEST_CHECK(resultTips.Count() == 0);
}
{ // Check non-empty tip array
Property::Array toggleIcons;
- toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
- toggleIcons.PushBack( TEST_IMAGE_TWO );
- toggleIcons.PushBack( TEST_IMAGE_THREE );
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+ toggleIcons.PushBack(TEST_IMAGE_ONE); //Icons path
+ toggleIcons.PushBack(TEST_IMAGE_TWO);
+ toggleIcons.PushBack(TEST_IMAGE_THREE);
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons);
Property::Array toggleTips;
- toggleTips.PushBack( "Button State A" ); //Tooltip string
- toggleTips.PushBack( "Button State B" );
- toggleTips.PushBack( "Button State C" );
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips );
+ toggleTips.PushBack("Button State A"); //Tooltip string
+ toggleTips.PushBack("Button State B");
+ toggleTips.PushBack("Button State C");
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips);
application.SendNotification();
application.Render();
Property::Array resultTips;
- resultTips = toggleButton.GetProperty( Toolkit::ToggleButton::Property::TOOLTIPS ).Get<Property::Array>();
+ resultTips = toggleButton.GetProperty(Toolkit::ToggleButton::Property::TOOLTIPS).Get<Property::Array>();
//Check that the result is the same as
- DALI_TEST_EQUALS( toggleTips.Count(), resultTips.Count(), TEST_LOCATION );
- DALI_TEST_CHECK( toggleTips[0].Get<std::string>() == resultTips[0].Get<std::string>() );
- DALI_TEST_CHECK( toggleTips[1].Get<std::string>() == resultTips[1].Get<std::string>() );
- DALI_TEST_CHECK( toggleTips[2].Get<std::string>() == resultTips[2].Get<std::string>() );
- DALI_TEST_CHECK( toggleTips[3].Get<std::string>() == resultTips[3].Get<std::string>() );
+ DALI_TEST_EQUALS(toggleTips.Count(), resultTips.Count(), TEST_LOCATION);
+ DALI_TEST_CHECK(toggleTips[0].Get<std::string>() == resultTips[0].Get<std::string>());
+ DALI_TEST_CHECK(toggleTips[1].Get<std::string>() == resultTips[1].Get<std::string>());
+ DALI_TEST_CHECK(toggleTips[2].Get<std::string>() == resultTips[2].Get<std::string>());
+ DALI_TEST_CHECK(toggleTips[3].Get<std::string>() == resultTips[3].Get<std::string>());
}
END_TEST;
}
int UtcDaliToggleButtonStateChange(void)
{
- ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
+ ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
tet_infoline(" UtcDaliToggleButtonStateChange");
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
- toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- toggleButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
- toggleButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
+ application.GetScene().Add(toggleButton);
+ toggleButton.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty(Actor::Property::ANCHOR_POINT, ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty(Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS);
+ toggleButton.SetProperty(Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS);
Property::Array toggleIcons;
- toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
- toggleIcons.PushBack( TEST_IMAGE_TWO );
- toggleIcons.PushBack( TEST_IMAGE_THREE );
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+ toggleIcons.PushBack(TEST_IMAGE_ONE); //Icons path
+ toggleIcons.PushBack(TEST_IMAGE_TWO);
+ toggleIcons.PushBack(TEST_IMAGE_THREE);
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons);
Property::Array toggleTips;
- toggleTips.PushBack( "Button State A" ); //Tooltip string
- toggleTips.PushBack( "Button State B" );
- toggleTips.PushBack( "Button State C" );
- toggleButton.SetProperty( Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips );
+ toggleTips.PushBack("Button State A"); //Tooltip string
+ toggleTips.PushBack("Button State B");
+ toggleTips.PushBack("Button State C");
+ toggleButton.SetProperty(Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips);
application.SendNotification();
application.Render();
Property::Array resultIcons;
- resultIcons = toggleButton.GetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS ).Get<Property::Array>();
- DALI_TEST_EQUALS( toggleIcons.Count(), resultIcons.Count(), TEST_LOCATION );
+ resultIcons = toggleButton.GetProperty(Toolkit::ToggleButton::Property::STATE_VISUALS).Get<Property::Array>();
+ DALI_TEST_EQUALS(toggleIcons.Count(), resultIcons.Count(), TEST_LOCATION);
Property::Array resultTips;
- resultTips = toggleButton.GetProperty( Toolkit::ToggleButton::Property::TOOLTIPS ).Get<Property::Array>();
- DALI_TEST_EQUALS( toggleTips.Count(), resultTips.Count(), TEST_LOCATION );
+ resultTips = toggleButton.GetProperty(Toolkit::ToggleButton::Property::TOOLTIPS).Get<Property::Array>();
+ DALI_TEST_EQUALS(toggleTips.Count(), resultTips.Count(), TEST_LOCATION);
int index;
- DALI_TEST_CHECK( toggleButton.GetProperty( Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX ).Get( index ) );
- DALI_TEST_EQUALS( index, 0, TEST_LOCATION );
+ DALI_TEST_CHECK(toggleButton.GetProperty(Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX).Get(index));
+ DALI_TEST_EQUALS(index, 0, TEST_LOCATION);
Dali::Integration::TouchEvent event;
// Touch point down and up inside the button 3 times.
event = Dali::Integration::TouchEvent();
- event.AddPoint( GetPointDownInside() );
- application.ProcessEvent( event );
+ event.AddPoint(GetPointDownInside());
+ application.ProcessEvent(event);
event = Dali::Integration::TouchEvent();
- event.AddPoint( GetPointUpInside() );
- application.ProcessEvent( event );
+ event.AddPoint(GetPointUpInside());
+ application.ProcessEvent(event);
- DALI_TEST_CHECK( toggleButton.GetProperty( Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX ).Get( index ) );
- DALI_TEST_EQUALS( index, 1, TEST_LOCATION );
+ DALI_TEST_CHECK(toggleButton.GetProperty(Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX).Get(index));
+ DALI_TEST_EQUALS(index, 1, TEST_LOCATION);
event = Dali::Integration::TouchEvent();
- event.AddPoint( GetPointDownInside() );
- application.ProcessEvent( event );
+ event.AddPoint(GetPointDownInside());
+ application.ProcessEvent(event);
event = Dali::Integration::TouchEvent();
- event.AddPoint( GetPointUpInside() );
- application.ProcessEvent( event );
+ event.AddPoint(GetPointUpInside());
+ application.ProcessEvent(event);
- DALI_TEST_CHECK( toggleButton.GetProperty( Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX ).Get( index ) );
- DALI_TEST_EQUALS( index, 2, TEST_LOCATION );
+ DALI_TEST_CHECK(toggleButton.GetProperty(Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX).Get(index));
+ DALI_TEST_EQUALS(index, 2, TEST_LOCATION);
event = Dali::Integration::TouchEvent();
- event.AddPoint( GetPointDownInside() );
- application.ProcessEvent( event );
+ event.AddPoint(GetPointDownInside());
+ application.ProcessEvent(event);
event = Dali::Integration::TouchEvent();
- event.AddPoint( GetPointUpInside() );
- application.ProcessEvent( event );
+ event.AddPoint(GetPointUpInside());
+ application.ProcessEvent(event);
- DALI_TEST_CHECK( toggleButton.GetProperty( Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX ).Get( index ) );
- DALI_TEST_EQUALS( index, 0, TEST_LOCATION );
+ DALI_TEST_CHECK(toggleButton.GetProperty(Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX).Get(index));
+ DALI_TEST_EQUALS(index, 0, TEST_LOCATION);
END_TEST;
}