X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-RadioButton.cpp;h=24b496474e18afe3d897bf1e3bfcbaa04d481718;hp=521d6cab182b57f1f694f3c1e9e8e67a8b39d904;hb=863244a09761c6e22a224299b6155a285e21d6ec;hpb=c3f7ea6cb0c0b75c2276193aff88b5c7a679a2d5 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp index 521d6ca..24b4964 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp @@ -21,6 +21,8 @@ #include #include +#include +#include using namespace Dali; using namespace Dali::Toolkit; @@ -140,14 +142,22 @@ int UtcDaliRadioButtonLabelActor(void) { ToolkitTestApplication application; - TextLabel actor1 = TextLabel::New( "test actor 1" ); + std::string labelText = "test actor 1"; - RadioButton radioButton = RadioButton::New( actor1 ); - DALI_TEST_CHECK( actor1 == radioButton.GetLabel() ); + RadioButton radioButton = RadioButton::New(); + + radioButton.SetProperty( Toolkit::Button::Property::LABEL, + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ) + ); + + radioButton.SetLabelText( labelText ); + + DALI_TEST_EQUALS( radioButton.GetLabelText(), labelText, TEST_LOCATION ); - TextLabel actor2 = TextLabel::New( "test actor 2" ); - radioButton.SetLabel( actor2 ); - DALI_TEST_CHECK( actor2 == radioButton.GetLabel() ); + std::string labelText2 = "test actor 2"; + radioButton.SetLabelText( labelText2 ); + DALI_TEST_EQUALS( radioButton.GetLabelText(), labelText2, TEST_LOCATION ); END_TEST; } @@ -236,8 +246,12 @@ int UtcDaliRadioButtonSelectedProperty(void) Dali::Integration::TouchEvent event1 = Dali::Integration::TouchEvent(); Dali::Integration::TouchEvent event2 = Dali::Integration::TouchEvent(); - const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 10.0f, 10.0f ); - const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 10.0f, 10.0f ); + Dali::Integration::Point pointDown; + pointDown.SetState( PointState::DOWN ); + pointDown.SetScreenPosition( Vector2( 1.0f, 1.0f ) ); + + Dali::Integration::Point pointUp( pointDown ); + pointUp.SetState( PointState::UP ); event1.AddPoint( pointDown ); application.ProcessEvent( event1 ); @@ -257,8 +271,12 @@ int UtcDaliRadioButtonSelectedProperty(void) Dali::Integration::TouchEvent event1 = Dali::Integration::TouchEvent(); Dali::Integration::TouchEvent event2 = Dali::Integration::TouchEvent(); - const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 10.0f, 10.0f ); - const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 10.0f, 10.0f ); + Dali::Integration::Point pointDown; + pointDown.SetState( PointState::DOWN ); + pointDown.SetScreenPosition( Vector2( 1.0f, 1.0f ) ); + + Dali::Integration::Point pointUp( pointDown ); + pointUp.SetState( PointState::UP ); event1.AddPoint( pointDown ); application.ProcessEvent( event1 ); @@ -278,8 +296,12 @@ int UtcDaliRadioButtonSelectedProperty(void) Dali::Integration::TouchEvent event1 = Dali::Integration::TouchEvent(); Dali::Integration::TouchEvent event2 = Dali::Integration::TouchEvent(); - const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 10.0f, 50.0f ); - const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 10.0f, 50.0f ); + Dali::Integration::Point pointDown; + pointDown.SetState( PointState::DOWN ); + pointDown.SetScreenPosition( Vector2( 1.0f, 41.0f ) ); + + Dali::Integration::Point pointUp( pointDown ); + pointUp.SetState( PointState::UP ); event1.AddPoint( pointDown ); application.ProcessEvent( event1 ); @@ -299,8 +321,12 @@ int UtcDaliRadioButtonSelectedProperty(void) Dali::Integration::TouchEvent event1 = Dali::Integration::TouchEvent(); Dali::Integration::TouchEvent event2 = Dali::Integration::TouchEvent(); - const Dali::TouchPoint pointDown( 0, TouchPoint::Down, 10.0f, 500.0f ); - const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 10.0f, 500.0f ); + Dali::Integration::Point pointDown; + pointDown.SetState( PointState::DOWN ); + pointDown.SetScreenPosition( Vector2( 1.0f, 500.0f ) ); + + Dali::Integration::Point pointUp( pointDown ); + pointUp.SetState( PointState::UP ); event1.AddPoint( pointDown ); application.ProcessEvent( event1 );