Add unit test for wxWindow::IsThisEnabled()

Check that the child IsEnabled() returns false if its parent is
disabled, but its IsThisEnabled() still returns true in this case.
This commit is contained in:
Vadim Zeitlin
2019-10-27 01:31:21 +02:00
parent 37ca3bcae9
commit 6530323f31

View File

@@ -364,6 +364,28 @@ TEST_CASE_METHOD(WindowTestCase, "Window::Enable", "[window]")
m_window->Enable(false);
CHECK(!m_window->IsEnabled());
m_window->Enable();
wxWindow* const child = new wxWindow(m_window, wxID_ANY);
CHECK(child->IsEnabled());
CHECK(child->IsThisEnabled());
m_window->Disable();
CHECK(!child->IsEnabled());
CHECK(child->IsThisEnabled());
child->Disable();
CHECK(!child->IsEnabled());
CHECK(!child->IsThisEnabled());
m_window->Enable();
CHECK(!child->IsEnabled());
CHECK(!child->IsThisEnabled());
child->Enable();
CHECK(child->IsEnabled());
CHECK(child->IsThisEnabled());
}
TEST_CASE_METHOD(WindowTestCase, "Window::FindWindowBy", "[window]")