Apply workaround for ancient MinGW to the menu unit test
Do the same thing for the just added tests as was already done in
8db55e9653 (Explicitly cast enum to int inside CHECK(), 2019-09-30) for
the other ones.
This commit is contained in:
@@ -641,35 +641,35 @@ void MenuTestCase::Events()
|
|||||||
sim.Char('U', wxMOD_CONTROL);
|
sim.Char('U', wxMOD_CONTROL);
|
||||||
wxYield();
|
wxYield();
|
||||||
if ( handler.GotEvent() )
|
if ( handler.GotEvent() )
|
||||||
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccel );
|
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccel) );
|
||||||
else
|
else
|
||||||
FAIL("No expected event for Ctrl-U");
|
FAIL("No expected event for Ctrl-U");
|
||||||
|
|
||||||
sim.Char('V', wxMOD_CONTROL);
|
sim.Char('V', wxMOD_CONTROL);
|
||||||
wxYield();
|
wxYield();
|
||||||
if ( handler.GotEvent() )
|
if ( handler.GotEvent() )
|
||||||
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccel );
|
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccel) );
|
||||||
else
|
else
|
||||||
FAIL("No expected event for Ctrl-V");
|
FAIL("No expected event for Ctrl-V");
|
||||||
|
|
||||||
sim.Char('W', wxMOD_CONTROL);
|
sim.Char('W', wxMOD_CONTROL);
|
||||||
wxYield();
|
wxYield();
|
||||||
if ( handler.GotEvent() )
|
if ( handler.GotEvent() )
|
||||||
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccels );
|
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccels) );
|
||||||
else
|
else
|
||||||
FAIL("No expected event for Ctrl-W");
|
FAIL("No expected event for Ctrl-W");
|
||||||
|
|
||||||
sim.Char('T', wxMOD_CONTROL);
|
sim.Char('T', wxMOD_CONTROL);
|
||||||
wxYield();
|
wxYield();
|
||||||
if ( handler.GotEvent() )
|
if ( handler.GotEvent() )
|
||||||
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccels );
|
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccels) );
|
||||||
else
|
else
|
||||||
FAIL("No expected event for Ctrl-T");
|
FAIL("No expected event for Ctrl-T");
|
||||||
|
|
||||||
sim.Char('W', wxMOD_CONTROL | wxMOD_SHIFT);
|
sim.Char('W', wxMOD_CONTROL | wxMOD_SHIFT);
|
||||||
wxYield();
|
wxYield();
|
||||||
if ( handler.GotEvent() )
|
if ( handler.GotEvent() )
|
||||||
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccels );
|
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccels) );
|
||||||
else
|
else
|
||||||
FAIL("No expected event for Ctrl-Shift-W");
|
FAIL("No expected event for Ctrl-Shift-W");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user