Merge "Calculate the visual to logical cursor position conversion table." into new_text
authorPaul Wisbey <p.wisbey@samsung.com>
Thu, 9 Apr 2015 09:54:11 +0000 (02:54 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 9 Apr 2015 09:54:11 +0000 (02:54 -0700)
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)
 {
-  // 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;
 }
 
index 850f6a4..0d259d9 100644 (file)
@@ -316,6 +316,9 @@ int UtcDaliPushButtonSetLabelText(void)
 
   pushButton.SetLabel( STR );
 
+  TextLabel label = TextLabel::DownCast( pushButton.GetLabel() );
+  DALI_TEST_CHECK( STR == label.GetProperty<std::string>( TextLabel::Property::TEXT ) );
+
   END_TEST;
 }
 
index a3fed65..c20a167 100644 (file)
@@ -103,7 +103,17 @@ int UtcDaliRadioButtonDownCast(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;
 }