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:
Vadim Zeitlin
2021-11-16 20:21:51 +01:00
parent 0cd898975c
commit 5f5d61f759

View File

@@ -641,35 +641,35 @@ void MenuTestCase::Events()
sim.Char('U', wxMOD_CONTROL);
wxYield();
if ( handler.GotEvent() )
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccel );
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccel) );
else
FAIL("No expected event for Ctrl-U");
sim.Char('V', wxMOD_CONTROL);
wxYield();
if ( handler.GotEvent() )
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccel );
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccel) );
else
FAIL("No expected event for Ctrl-V");
sim.Char('W', wxMOD_CONTROL);
wxYield();
if ( handler.GotEvent() )
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccels );
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccels) );
else
FAIL("No expected event for Ctrl-W");
sim.Char('T', wxMOD_CONTROL);
wxYield();
if ( handler.GotEvent() )
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccels );
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccels) );
else
FAIL("No expected event for Ctrl-T");
sim.Char('W', wxMOD_CONTROL | wxMOD_SHIFT);
wxYield();
if ( handler.GotEvent() )
CHECK( handler.GetEvent().GetId() == MenuTestCase_ExtraAccels );
CHECK( handler.GetEvent().GetId() == static_cast<int>(MenuTestCase_ExtraAccels) );
else
FAIL("No expected event for Ctrl-Shift-W");