+ DALI_TEST_CHECK(model->IsTextElideEnabled());
+
+ tet_result(TET_PASS);
+ END_TEST;
+}
+
+int UtcDaliTextViewModelGetCharacters(void)
+{
+ tet_infoline(" UtcDaliTextViewModelGetLines");
+ ToolkitTestApplication application;
+
+ // Creates a text controller.
+ ControllerPtr controller = Controller::New();
+
+ // Tests the rendering controller has been created.
+ TypesetterPtr typesetter = Typesetter::New(controller->GetTextModel());
+ DALI_TEST_CHECK(typesetter);
+
+ // Tests the view model has been created.
+ ViewModel* model = typesetter->GetViewModel();
+ DALI_TEST_CHECK(NULL != model);
+
+ // Configures the text controller similarly to the text-editor.
+ ConfigureTextEditor(controller);
+
+ // The number of characters should be zero.
+ DALI_TEST_EQUALS(0u, model->GetNumberOfCharacters(), TEST_LOCATION);
+
+ // Sets a text and relais-out.
+ controller->SetText(LOREM_IPSUM);
+ controller->Relayout(CONTROL_SIZE);
+
+ DALI_TEST_EQUALS(LOREM_NUMBER_OF_CHARACTERS, model->GetNumberOfCharacters(), TEST_LOCATION);
+ // Configures the text controller similarly to the text-label.
+ ConfigureTextLabel(controller);
+
+ // Relais-out for the text-label configuration.
+ controller->Relayout(Size(100.f, 100.f)); // Change the size to force a relayout.
+ controller->Relayout(CONTROL_SIZE);
+
+ DALI_TEST_EQUALS(LOREM_NUMBER_OF_CHARACTERS_ELIDED, model->GetNumberOfCharacters(), TEST_LOCATION);