X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-internal%2Futc-Dali-PushButton.cpp;h=e23dbe3b5ba436f35922b18e41e65c210f200750;hp=8d2734be86cdca77e8b751203bb14337eb3bc636;hb=7f36ca9572ba3086167d5238a7aff909b56a50f4;hpb=d04c5bdbb95cc98f90848c7a98b0b2804df6e5b8 diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-PushButton.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-PushButton.cpp index 8d2734b..e23dbe3 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-PushButton.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-PushButton.cpp @@ -313,6 +313,22 @@ static bool TestCallback(Actor actor, const TouchEvent& event) ////////////////////////////////////////////////////////// +int UtcDaliPushButtonDownCast(void) +{ + ToolkitTestApplication application; + tet_infoline(" UtcDaliPushButtonDownCast"); + + TETButton tetButton= Toolkit::TETButton::New(); + + BaseHandle object(tetButton); + + TETButton tetButton2 = TETButton::DownCast( object ); + DALI_TEST_CHECK(tetButton2); + + TETButton tetButton3 = DownCast< TETButton >(object); + DALI_TEST_CHECK(tetButton3); + END_TEST; +} int UtcDaliPushButtonInterruptEventWhenInsensitive(void) { @@ -673,53 +689,5 @@ int UtcDaliPushButtonProperties(void) DALI_TEST_CHECK( button.IsSelected() ) ; DALI_TEST_CHECK( button.GetProperty< bool >( Button::Property::SELECTED ) ); - // Button::PROPERTY_NORMAL_STATE_ACTOR - { - button.SetButtonImage( ResourceImage::New( "IMAGE_PATH_1") ); - DALI_TEST_EQUALS( "IMAGE_PATH_1", button.GetProperty( Button::Property::NORMAL_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION ); - - Property::Map map; - map[ "type" ] = "ImageActor"; - - button.SetProperty( Button::Property::NORMAL_STATE_ACTOR, map ); - DALI_TEST_EQUALS( "ImageActor", button.GetProperty( Button::Property::NORMAL_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION ); - } - - // Button::PROPERTY_SELECTED_STATE_ACTOR - { - button.SetSelectedImage( ResourceImage::New( "IMAGE_PATH_2") ); - DALI_TEST_EQUALS( "IMAGE_PATH_2", button.GetProperty( Button::Property::SELECTED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION ); - - Property::Map map; - map[ "type" ] = "Actor"; - - button.SetProperty( Button::Property::SELECTED_STATE_ACTOR, map ); - DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::Property::SELECTED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION ); - DALI_TEST_CHECK( "ImageActor" != button.GetProperty( Button::Property::SELECTED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >() ); - } - - // Button::PROPERTY_DISABLED_STATE_ACTOR - { - button.SetDisabledImage( ResourceImage::New( "IMAGE_PATH_3") ); - DALI_TEST_EQUALS( "IMAGE_PATH_3", button.GetProperty( Button::Property::DISABLED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION ); - - Property::Map map; - map[ "type" ] = "Actor"; - - button.SetProperty( Button::Property::DISABLED_STATE_ACTOR, map ); - DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::Property::DISABLED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION ); - } - - // Button::PROPERTY_LABEL_ACTOR - { - button.SetLabel( "LABEL_TEXT_CUSTOM" ); - DALI_TEST_EQUALS( "TextLabel", button.GetProperty( Button::Property::LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION ); - - Property::Map map; - map[ "type" ] = "Actor"; - - button.SetProperty( Button::Property::LABEL_ACTOR, map ); - DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::Property::LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION ); - } END_TEST; }