From 464f696f9edeafe265723a22da7505607dea19ed Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Thu, 21 Jun 2018 23:05:33 -0500 Subject: [PATCH] Added a test with a tiny bit of meaning (cribbed from wxWidgets tests). --- src/test/GUI/test_field_checkbox.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/test/GUI/test_field_checkbox.cpp b/src/test/GUI/test_field_checkbox.cpp index 5453ee270..3818bb9ba 100644 --- a/src/test/GUI/test_field_checkbox.cpp +++ b/src/test/GUI/test_field_checkbox.cpp @@ -7,5 +7,20 @@ #include "testableframe.h" -TEST_CASE( "Dummy" ) { +SCENARIO( "checkboxes return true when checked.", "[checkbox]" ) { + GIVEN( "A checkbox item") { + wxCheckBox* m_check = new wxCheckBox(wxTheApp->GetTopWindow(), wxID_ANY, "Check box"); + WHEN ( "the box is checked") { + m_check->SetValue(true); + THEN ( "the checkbox reads true") { + REQUIRE(m_check->IsChecked() == true); + } + } + WHEN ( "the box is not checked") { + m_check->SetValue(false); + THEN ( "the checkbox reads false") { + REQUIRE(m_check->IsChecked() == false); + } + } + } }