https://git.reactos.org/?p=reactos.git;a=commitdiff;h=427d8af7f13dd617532e8…
commit 427d8af7f13dd617532e80dfaae8e4892b6aaa89
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sun Mar 13 19:04:00 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:24 2022 +0100
[SDK/WINE] Add support for subtest
https://source.winehq.org/git/wine.git/commit/033196641b0c33c1047234cdb278f…
---
modules/rostests/apitests/compiler/pseh.c | 1 +
sdk/include/reactos/wine/test.h | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/modules/rostests/apitests/compiler/pseh.c
b/modules/rostests/apitests/compiler/pseh.c
index 86184375870..7090394f7cb 100644
--- a/modules/rostests/apitests/compiler/pseh.c
+++ b/modules/rostests/apitests/compiler/pseh.c
@@ -27,6 +27,7 @@ extern "C" {
#endif
#include <wine/test.h>
+#undef subtest
extern void no_op(void);
extern int return_arg(int);
diff --git a/sdk/include/reactos/wine/test.h b/sdk/include/reactos/wine/test.h
index 8b9035adfcf..28d993217c9 100644
--- a/sdk/include/reactos/wine/test.h
+++ b/sdk/include/reactos/wine/test.h
@@ -62,6 +62,7 @@ extern int winetest_interactive;
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_start_todo( int is_todo );
extern int winetest_loop_todo(void);
extern void winetest_end_todo(void);
@@ -141,11 +142,13 @@ extern void __winetest_cdecl winetest_print(const char* msg, ...);
#endif /* __GNUC__ */
+#define subtest_(file, line) (winetest_set_location(file, line), 0) ? (void)0 :
winetest_subtest
#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
+#define subtest subtest_(__FILE__, __LINE__)
#define ok ok_(__FILE__, __LINE__)
#define skip skip_(__FILE__, __LINE__)
#define win_skip win_skip_(__FILE__, __LINE__)
@@ -345,6 +348,13 @@ void winetest_set_location( const char* file, int line )
data->current_line=line;
}
+void winetest_subtest(const char* name)
+{
+ tls_data* data = get_tls_data();
+ printf(__winetest_file_line_prefix ": Subtest %s\n",
+ data->current_file, data->current_line, name);
+}
+
int broken( int condition )
{
return ((strcmp(winetest_platform, "windows") == 0)