Two use cases for this: - No-op changes that change the line count will generate now the exact same object file. - While writing new tests that change the line count this allows for an easier diff between the two test runs.
Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- include/wine/test.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/include/wine/test.h b/include/wine/test.h index 476b4d9847..e73f40d575 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -113,10 +113,17 @@ extern void __winetest_cdecl winetest_skip( const char *msg, ... ) WINETEST_PRIN extern void __winetest_cdecl winetest_win_skip( const char *msg, ... ) WINETEST_PRINTF_ATTR(1,2); extern void __winetest_cdecl winetest_trace( const char *msg, ... ) WINETEST_PRINTF_ATTR(1,2);
-#define ok_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ok -#define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip -#define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip -#define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace +#ifdef WINETEST_NO_LINE_NUMBERS +# define ok_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_ok +# define skip_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_skip +# define win_skip_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_win_skip +# define trace_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_trace +#else +# define ok_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ok +# define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip +# define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip +# define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace +#endif
#define ok ok_(__FILE__, __LINE__) #define skip skip_(__FILE__, __LINE__)