File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2424
2525#include " TGUI/Color.hpp"
26+ #include " TGUI/TextStyle.hpp"
2627#include " Tests.hpp"
2728
2829TEST_CASE (" [Text]" )
@@ -165,5 +166,13 @@ TEST_CASE("[Text]")
165166 text3.setFont (" resources/DejaVuSans.ttf" );
166167 REQUIRE (text.getSize ().y == text3.getSize ().y );
167168 }
169+
170+ SECTION (" Line width without font" )
171+ {
172+ REQUIRE (text.getLineWidth (" Foo" , nullptr , 0 , {}) == 0 .0f );
173+ REQUIRE (text.getLineWidth (" Bar" , nullptr , 1 , tgui::TextStyle::Underlined) == 0 .0f );
174+ REQUIRE (text.getLineWidth (" Baz" , nullptr , 42 , {}) == 0 .0f );;
175+ REQUIRE (text.getLineWidth (" FooBar" , nullptr , 666 , tgui::TextStyle::StrikeThrough) == 0 .0f );
176+ }
168177 }
169178}
You can’t perform that action at this time.
0 commit comments