Francois Gouget : tests: Add ignore_exceptions().
Alexandre Julliard
julliard at winehq.org
Mon Feb 15 16:09:51 CST 2021
Module: wine
Branch: master
Commit: 4ac37c4e24cf980717a982c22076cc4a5adffdd5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4ac37c4e24cf980717a982c22076cc4a5adffdd5
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Fri Feb 12 17:14:29 2021 +0100
tests: Add ignore_exceptions().
This lets tests signal that for a while exceptions are expected and
should not be counted as test failures.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/wine/test.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/wine/test.h b/include/wine/test.h
index c10050012b6..078b0147c4f 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -61,6 +61,7 @@ extern const char *winetest_platform;
extern void winetest_set_location( const char* file, int line );
extern void winetest_subtest( const char* name );
+extern void winetest_ignore_exceptions( BOOL ignore );
extern void winetest_start_todo( int is_todo );
extern int winetest_loop_todo(void);
extern void winetest_end_todo(void);
@@ -97,6 +98,7 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) __WINE_PRINT
#ifdef WINETEST_NO_LINE_NUMBERS
# define subtest_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_subtest
+# define ignore_exceptions_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_ignore_exceptions
# 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
@@ -104,6 +106,7 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) __WINE_PRINT
# define wait_child_process_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_wait_child_process
#else
# define subtest_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_subtest
+# define ignore_exceptions_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ignore_exceptions
# 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
@@ -112,6 +115,7 @@ extern void __winetest_cdecl winetest_trace( const char *msg, ... ) __WINE_PRINT
#endif
#define subtest subtest_(__FILE__, __LINE__)
+#define ignore_exceptions ignore_exceptions_(__FILE__, __LINE__)
#define ok ok_(__FILE__, __LINE__)
#define skip skip_(__FILE__, __LINE__)
#define win_skip win_skip_(__FILE__, __LINE__)
@@ -298,6 +302,14 @@ void winetest_subtest( const char* name )
data->current_file, data->current_line, winetest_elapsed(), name );
}
+void winetest_ignore_exceptions( BOOL ignore )
+{
+ struct tls_data *data = get_tls_data();
+ printf( "%s:%d:%s IgnoreExceptions=%d\n",
+ data->current_file, data->current_line, winetest_elapsed(),
+ ignore ? 1 : 0 );
+}
+
int broken( int condition )
{
return (strcmp(winetest_platform, "windows") == 0) && condition;
More information about the wine-cvs
mailing list