extern int winetest_loop_todo(void);
extern void winetest_end_todo( const char* platform );
extern int winetest_get_mainargs( char*** pargv );
+extern LONG winetest_get_failures(void);
+extern void winetest_add_failures( LONG new_failures );
extern void winetest_wait_child_process( HANDLE process );
-extern const char *wine_dbgstr_wn( const WCHAR *str, int n );
+extern const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n );
+extern const char *wine_dbgstr_guid( const GUID *guid );
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
+/* strcmpW is available 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 )
{
#define todo(platform) for (winetest_start_todo(platform); \
winetest_loop_todo(); \
winetest_end_todo(platform))
+
+#define todo_ros todo("reactos")
+#ifdef USE_WINE_TODOS
+#define todo_wine todo_ros
+#else
#define todo_wine todo("wine")
+#endif
#ifdef NONAMELESSUNION
DWORD last_error;
last_error=GetLastError();
- data=TlsGetValue(tls_index);
+ data=(tls_data*)TlsGetValue(tls_index);
if (!data)
{
- data=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(tls_data));
+ data=(tls_data*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(tls_data));
data->str_pos = data->strings;
TlsSetValue(tls_index,data);
}
{
__winetest_va_list valist;
__winetest_va_start(valist, msg);
- if (strcmp(winetest_platform, "windows") == 0)
+ if ((strcmp(winetest_platform, "windows") == 0) || (strcmp(winetest_platform, "reactos") == 0))
winetest_vskip(msg, valist);
else
winetest_vok(0, msg, valist);
return winetest_argc;
}
+LONG winetest_get_failures(void)
+{
+ return failures;
+}
+
+void winetest_add_failures( LONG new_failures )
+{
+ while (new_failures-- > 0)
+ InterlockedIncrement( &failures );
+}
+
void winetest_wait_child_process( HANDLE process )
{
DWORD exit_code = 1;
}
}
-const char *wine_dbgstr_wn( const WCHAR *str, int n )
+const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n )
{
char *dst, *res;
size_t size;
return res;
}
+const char *wine_dbgstr_guid( const GUID *guid )
+{
+ char *res;
+
+ if (!guid) return "(null)";
+ res = get_temp_buffer( 39 ); /* CHARS_IN_GUID */
+ sprintf( res, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
+ guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
+ guid->Data4[5], guid->Data4[6], guid->Data4[7] );
+ return res;
+}
+
/* Find a test by name */
static const struct test *find_test( const char *name )
{
#define ok_char(expression, result) ok_hex(expression, result)
#define ok_err(error) \
- ok(GetLastError() == (error), "Wrong last error. Expected " #error ", got %d\n", (int)GetLastError())
+ ok(GetLastError() == (error), "Wrong last error. Expected " #error ", got 0x%lx\n", GetLastError())
#define ok_str(x, y) \
ok(strcmp(x, y) == 0, "Wrong string. Expected '%s', got '%s'\n", y, x)