File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727TEST_CASE (" [ToggleButton]" )
2828{
2929 const tgui::ToggleButton::Ptr button = tgui::ToggleButton::create ();
30+ const tgui::ToggleButton::Ptr buttonWithText = tgui::ToggleButton::create (" Button text" );
31+ const tgui::ToggleButton::Ptr buttonWithTextDown = tgui::ToggleButton::create (" Button text down" , true );
32+ const tgui::ToggleButton::Ptr buttonWithoutTextDown = tgui::ToggleButton::create (" " , true );
3033 button->getRenderer ()->setFont (" resources/DejaVuSans.ttf" );
3134
3235 SECTION (" Signals" )
@@ -59,6 +62,11 @@ TEST_CASE("[ToggleButton]")
5962 REQUIRE (button->getText ().empty ());
6063 button->setText (" SomeText" );
6164 REQUIRE (button->getText () == " SomeText" );
65+ REQUIRE (!buttonWithText->getText ().empty ());
66+ REQUIRE (buttonWithText->getText () == " Button text" );
67+ REQUIRE (!buttonWithTextDown->getText ().empty ());
68+ REQUIRE (buttonWithTextDown->getText () == " Button text down" );
69+ REQUIRE (buttonWithoutTextDown->getText ().empty ());
6270 }
6371
6472 SECTION (" Down" )
@@ -72,6 +80,9 @@ TEST_CASE("[ToggleButton]")
7280 REQUIRE (!button->isDown ());
7381 REQUIRE_NOTHROW (button->setDown (false ));
7482 REQUIRE (!button->isDown ());
83+ REQUIRE (!buttonWithText->isDown ());
84+ REQUIRE (buttonWithTextDown->isDown ());
85+ REQUIRE (buttonWithoutTextDown->isDown ());
7586 }
7687
7788 SECTION (" TextSize" )
You can’t perform that action at this time.
0 commit comments