Allow, and even require, semicolon after wxTEST_DIALOG() macro
This macro was documented (in its comment) and even used with a semicolon after it, but it didn't require one and using one after it resulted in a warning with gcc in pedantic mode. Change the macro definition to use wxSTATEMENT_MACRO_BEGIN/END to require (and, trivially, also allow to be used without warnings) a semicolon after it now.
This commit is contained in:
parent
00c541934d
commit
bed3896189
2 changed files with 6 additions and 2 deletions
|
|
@ -91,6 +91,9 @@ Changes in behaviour which may result in build errors
|
|||
options was completely removed. Please use address sanitizer or similar
|
||||
tools that are incomparably more useful for this than that legacy code.
|
||||
|
||||
- wxTEST_DIALOG() macro now must be followed by semicolon, whereas previously
|
||||
it was only supposed to, but it wasn't mandatory to use one after it.
|
||||
|
||||
|
||||
3.3.0: (released 2022-??-??)
|
||||
----------------------------
|
||||
|
|
|
|||
|
|
@ -516,12 +516,13 @@ private:
|
|||
method.
|
||||
*/
|
||||
#define wxTEST_DIALOG(codeToRun, ...) \
|
||||
{ \
|
||||
wxSTATEMENT_MACRO_BEGIN \
|
||||
wxTEST_DIALOG_HOOK_CLASS wx_hook(__FILE__, __LINE__, __func__); \
|
||||
wxCALL_FOR_EACH(WX_TEST_IMPL_ADD_EXPECTATION, __VA_ARGS__) \
|
||||
codeToRun; \
|
||||
wx_hook.CheckUnmetExpectations(); \
|
||||
}
|
||||
wxSTATEMENT_MACRO_END
|
||||
|
||||
|
||||
#endif // !WXBUILDING
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue