TCT fixes 06/37906/3
authorPaul Wisbey <p.wisbey@samsung.com>
Wed, 8 Apr 2015 08:21:57 +0000 (09:21 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Wed, 8 Apr 2015 15:55:03 +0000 (16:55 +0100)
Change-Id: I9937b263589b8fbd640a268a91b50d7c840457ba

automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp

index 2148042..0aaf295 100644 (file)
@@ -191,7 +191,19 @@ int UtcDaliPopupSetBackgroundImage(void)
 
 int UtcDaliPopupSetTitle(void)
 {
 
 int UtcDaliPopupSetTitle(void)
 {
-  // TODO
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+  tet_infoline(" UtcDaliPopupSetTitle");
+
+  // Create the Popup actor
+  Popup popup = Popup::New();
+  Stage::GetCurrent().Add( popup );
+  // Put in show state so it's layer is connected to popup (for ancestor check).
+  popup.SetState(Popup::POPUP_SHOW, 0.0f);
+
+  popup.SetTitle("title");
+
+  DALI_TEST_CHECK( popup.GetTitle() == "title" );
+
   END_TEST;
 }
 
   END_TEST;
 }
 
index 850f6a4..0d259d9 100644 (file)
@@ -316,6 +316,9 @@ int UtcDaliPushButtonSetLabelText(void)
 
   pushButton.SetLabel( STR );
 
 
   pushButton.SetLabel( STR );
 
+  TextLabel label = TextLabel::DownCast( pushButton.GetLabel() );
+  DALI_TEST_CHECK( STR == label.GetProperty<std::string>( TextLabel::Property::TEXT ) );
+
   END_TEST;
 }
 
   END_TEST;
 }
 
index a3fed65..c20a167 100644 (file)
@@ -103,7 +103,17 @@ int UtcDaliRadioButtonDownCast(void)
 
 int UtcDaliRadioButtonLabelActor(void)
 {
 
 int UtcDaliRadioButtonLabelActor(void)
 {
-  // TODO
+  ToolkitTestApplication application;
+
+  TextLabel actor1 = TextLabel::New( "test actor 1" );
+
+  RadioButton radioButton = RadioButton::New( actor1 );
+  DALI_TEST_CHECK( actor1 == radioButton.GetLabel() );
+
+  TextLabel actor2 = TextLabel::New( "test actor 2" );
+  radioButton.SetLabel( actor2 );
+  DALI_TEST_CHECK( actor2 == radioButton.GetLabel() );
+
   END_TEST;
 }
 
   END_TEST;
 }