const char* const PROPERTY_NAME_UNDERLINE_COLOR = "underline-color";
const char* const PROPERTY_NAME_UNDERLINE_HEIGHT = "underline-height";
-const unsigned int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
+const int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
} // namespace
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
- // Check defaults
- DALI_TEST_EQUALS( label.GetProperty<unsigned int>( TextLabel::Property::RENDERING_BACKEND ), DEFAULT_RENDERING_BACKEND, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::TEXT ), std::string(""), TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::FONT_FAMILY ), std::string(""), TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::FONT_STYLE ), std::string(""), TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::POINT_SIZE ), 0.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<bool>( TextLabel::Property::MULTI_LINE ), false, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::HORIZONTAL_ALIGNMENT ), "BEGIN", TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::VERTICAL_ALIGNMENT ), "TOP", TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ), Color::BLACK, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ), Vector2::ZERO, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR ), Color::BLACK, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<bool>( TextLabel::Property::UNDERLINE_ENABLED ), false, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::UNDERLINE_COLOR ), Color::BLACK, TEST_LOCATION );
- DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::UNDERLINE_HEIGHT ), 0.0f, TEST_LOCATION );
-
- label.SetProperty( TextLabel::Property::RENDERING_BACKEND, Text::RENDERING_BASIC );
- DALI_TEST_EQUALS( label.GetProperty<unsigned int>( TextLabel::Property::RENDERING_BACKEND ), Text::RENDERING_BASIC, TEST_LOCATION );
+ // Note - we can't check the defaults since the stylesheets are platform-specific
+ label.SetProperty( TextLabel::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS );
+ DALI_TEST_EQUALS( label.GetProperty<int>( TextLabel::Property::RENDERING_BACKEND ), Text::RENDERING_SHARED_ATLAS, TEST_LOCATION );
// Check that text can be correctly reset
label.SetProperty( TextLabel::Property::TEXT, "Setting Text" );
END_TEST;
}
-int UtcDaliToolkitTextlabelBasicRenderP(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" UtcDaliToolkitTextLabelBasicRenderP");
- TextLabel label = TextLabel::New("Test Text");
- DALI_TEST_CHECK( label );
-
- // Avoid a crash when core load gl resources.
- application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
-
- Stage::GetCurrent().Add( label );
-
- label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "BEGIN" );
- label.SetProperty( TextLabel::Property::MULTI_LINE, true );
-
- try
- {
- // Render some text with the basic backend
- label.SetProperty( TextLabel::Property::RENDERING_BACKEND, Text::RENDERING_BASIC );
- application.SendNotification();
- application.Render();
- }
- catch( ... )
- {
- tet_result(TET_FAIL);
- }
- END_TEST;
-}
-
int UtcDaliToolkitTextlabelAtlasRenderP(void)
{
ToolkitTestApplication application;
{
tet_result(TET_FAIL);
}
+
END_TEST;
}