Make wxRadioButton focus test MSW-specific
This test doesn't need to, and actually does not, pass under wxGTK, where a radio button can have focus without being selected, unlike in wxMSW.
This commit is contained in:
@@ -248,7 +248,15 @@ TEST_CASE("wxRadioButton::Focus", "[radiobutton][focus]")
|
||||
// And giving the focus to the panel shouldn't change radio button
|
||||
// selection.
|
||||
radioPanel->SetFocus();
|
||||
|
||||
// Under MSW, focus is always on the selected button, but in the other
|
||||
// ports this is not necessarily the case, i.e. under wxGTK this check
|
||||
// would fail because focus gets set to the first button -- even though the
|
||||
// second one remains checked.
|
||||
#ifdef __WXMSW__
|
||||
CHECK_FOCUS_IS(radio2);
|
||||
#endif
|
||||
|
||||
CHECK(!radio1->GetValue());
|
||||
CHECK(radio2->GetValue());
|
||||
}
|
||||
|
Reference in New Issue
Block a user