File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 2222//
2323// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2424
25+ #include " TGUI/TextStyle.hpp"
2526#include " Tests.hpp"
2627
2728TEST_CASE (" [Text]" )
@@ -137,5 +138,13 @@ TEST_CASE("[Text]")
137138 text3.setFont (" resources/DejaVuSans.ttf" );
138139 REQUIRE (text.getSize ().y == text3.getSize ().y );
139140 }
141+
142+ SECTION (" Line width without font" )
143+ {
144+ REQUIRE (text.getLineWidth (" Foo" , nullptr , 0 , {}) == 0 .0f );
145+ REQUIRE (text.getLineWidth (" Bar" , nullptr , 1 , tgui::TextStyle::Underlined) == 0 .0f );
146+ REQUIRE (text.getLineWidth (" Baz" , nullptr , 42 , {}) == 0 .0f );;
147+ REQUIRE (text.getLineWidth (" FooBar" , nullptr , 666 , tgui::TextStyle::StrikeThrough) == 0 .0f );
148+ }
140149 }
141150}
You can’t perform that action at this time.
0 commit comments