Module: wine Branch: master Commit: bc07b48b38ced3d1cae5fa4b9e4d03c575d7f1af URL: http://source.winehq.org/git/wine.git/?a=commit;h=bc07b48b38ced3d1cae5fa4b9e...
Author: Mikołaj Zalewski mikolajz@tygrys.dom Date: Sat Feb 20 22:41:31 2010 +0100
include: Add a strcmpW-equivalent function usable in tests.
---
include/wine/test.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/wine/test.h b/include/wine/test.h index 42a56c0..5d371c5 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -65,6 +65,14 @@ extern void winetest_wait_child_process( HANDLE process ); extern const char *wine_dbgstr_wn( const WCHAR *str, int n ); static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
+/* strcmpW is avaiable for tests compiled under Wine, but not in standalone + * builds under Windows, so we reimplement it under a different name. */ +static inline int winetest_strcmpW( const WCHAR *str1, const WCHAR *str2 ) +{ + while (*str1 && (*str1 == *str2)) { str1++; str2++; } + return *str1 - *str2; +} + #ifdef STANDALONE #define START_TEST(name) \ static void func_##name(void); \