Ensure that test notebook is destroyed after the end of its test
Don't let wxNotebook created in the recently added test for the events generated when adding pages to it continue to live after the test end as this breaks the subsequent tests using wxUIActionSimulator (but only when using MinGW, for some reason).
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/notebook.h"
|
||||
#include "wx/scopedptr.h"
|
||||
|
||||
#include "bookctrlbasetest.h"
|
||||
#include "testableframe.h"
|
||||
@@ -125,6 +126,7 @@ TEST_CASE("wxNotebook::AddPageEvents", "[wxNotebook][AddPage][event]")
|
||||
wxNotebook* const
|
||||
notebook = new wxNotebook(wxTheApp->GetTopWindow(), wxID_ANY,
|
||||
wxDefaultPosition, wxSize(400, 200));
|
||||
wxScopedPtr<wxNotebook> cleanup(notebook);
|
||||
|
||||
CHECK( notebook->GetSelection() == wxNOT_FOUND );
|
||||
|
||||
|
Reference in New Issue
Block a user