From 8db55e965395aeb40017b39b17167d50f78af12d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 30 Sep 2019 11:27:42 +0200 Subject: [PATCH] Explicitly cast enum to int inside CHECK() Somehow using enum results in wrong comparison being done when using gcc 5.3 (the test run when using this compiler fails because the RHS value is "true" and not the numeric value of the enum element), so add a cast to make this work. --- tests/menu/menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/menu/menu.cpp b/tests/menu/menu.cpp index 99531c5622..b2723baea3 100644 --- a/tests/menu/menu.cpp +++ b/tests/menu/menu.cpp @@ -622,7 +622,7 @@ void MenuTestCase::Events() wxYield(); const wxCommandEvent& ev2 = handler.GetEvent(); - CHECK( ev2.GetId() == MenuTestCase_SelectAll ); + CHECK( ev2.GetId() == static_cast(MenuTestCase_SelectAll) ); // Now create a text control which uses the same accelerator for itself and // check that when the text control has focus, the accelerator does _not_