[PATCH 1/3] include: Make wine_dbgstr_rect() available for tests too.
Michael Stefaniuc
mstefani at redhat.de
Tue Jun 7 02:45:40 CDT 2016
Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
My coccinelle script found in tests 700+ uses for this function.
include/wine/test.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/wine/test.h b/include/wine/test.h
index 0d81a24..f33ab9a 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -66,6 +66,7 @@ extern void winetest_wait_child_process( HANDLE process );
extern const char *wine_dbgstr_wn( const WCHAR *str, int n );
extern const char *wine_dbgstr_guid( const GUID *guid );
+extern const char *wine_dbgstr_rect( const RECT *rect );
static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
/* strcmpW is available for tests compiled under Wine, but not in standalone
@@ -529,6 +530,17 @@ const char *wine_dbgstr_guid( const GUID *guid )
return res;
}
+const char *wine_dbgstr_rect( const RECT *rect )
+{
+ char *res;
+
+ if (!rect) return "(null)";
+ res = get_temp_buffer( 60 );
+ sprintf( res, "(%d,%d)-(%d,%d)", rect->left, rect->top, rect->right, rect->bottom );
+ release_temp_buffer( res, strlen(res) + 1 );
+ return res;
+}
+
/* Find a test by name */
static const struct test *find_test( const char *name )
{
--
2.5.5
More information about the wine-patches
mailing list