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

@@ -1271,9 +1271,14 @@ void TextCtrlTestCase::XYToPositionSingleLine()
TEST_CASE("wxTextCtrl::ProcessEnter", "[wxTextCtrl][enter]")
{
struct TextCtrlCreator
class TextCtrlCreator : public TextLikeControlCreator
{
static wxControl* Do(wxWindow* parent, int style)
public:
explicit TextCtrlCreator()
{
}
virtual wxControl* Create(wxWindow* parent, int style) const wxOVERRIDE
{
return new wxTextCtrl(parent, wxID_ANY, wxString(),
wxDefaultPosition, wxDefaultSize,
@@ -1281,7 +1286,7 @@ TEST_CASE("wxTextCtrl::ProcessEnter", "[wxTextCtrl][enter]")
}
};
TestProcessEnter(&TextCtrlCreator::Do);
TestProcessEnter(TextCtrlCreator());
}
#endif //wxUSE_TEXTCTRL