Replace a single function with a class in Enter processing tests

No real changes yet, this is a pure refactoring before the upcoming
changes.
This commit is contained in:
Vadim Zeitlin
2019-09-08 18:47:13 +02:00
parent ba2ea837de
commit e85b5e5261
4 changed files with 44 additions and 18 deletions

View File

@@ -233,9 +233,10 @@ void ComboBoxTestCase::IsEmpty()
TEST_CASE("wxComboBox::ProcessEnter", "[wxComboBox][enter]")
{
struct ComboBoxCreator
class ComboBoxCreator : public TextLikeControlCreator
{
static wxControl* Do(wxWindow* parent, int style)
public:
virtual wxControl* Create(wxWindow* parent, int style) const wxOVERRIDE
{
const wxString choices[] = { "foo", "bar", "baz" };
@@ -246,7 +247,7 @@ TEST_CASE("wxComboBox::ProcessEnter", "[wxComboBox][enter]")
}
};
TestProcessEnter(&ComboBoxCreator::Do);
TestProcessEnter(ComboBoxCreator());
}
#endif //wxUSE_COMBOBOX