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:
@@ -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]")
|
||||
|
Reference in New Issue
Block a user