diff --git a/rostests/apitests/atl/CImage.cpp b/rostests/apitests/atl/CImage.cpp index d294aa2ee45..bfa7c70a227 100644 --- a/rostests/apitests/atl/CImage.cpp +++ b/rostests/apitests/atl/CImage.cpp @@ -14,17 +14,15 @@ #include #include #include - const char *g_file = NULL; - int g_line = 0; int g_tests_executed = 0; int g_tests_failed = 0; - void ok_func(BOOL value, const char *fmt, ...) + void ok_func(const char *file, int line, BOOL value, const char *fmt, ...) { va_list va; va_start(va, fmt); if (!value) { - printf("%s (%d): ", g_file, g_line); + printf("%s (%d): ", file, line); vprintf(fmt, va); g_tests_failed++; } @@ -32,7 +30,7 @@ va_end(va); } #undef ok - #define ok g_file = __FILE__; g_line = __LINE__; ok_func + #define ok(value, ...) ok_func(__FILE__, __LINE__, value, __VA_ARGS__) #define START_TEST(x) int main(void) #endif @@ -59,7 +57,7 @@ static void write_bitmap(HINSTANCE hInst, int id, TCHAR* file) { HRSRC rsrc; - rsrc = FindResource(hInst, MAKEINTRESOURCE(id), MAKEINTRESOURCE(RT_BITMAP)); + rsrc = FindResource(hInst, MAKEINTRESOURCE(id), RT_BITMAP); ok(rsrc != NULL, "Expected to find an image resource\n"); if (rsrc) { @@ -274,5 +272,6 @@ START_TEST(CImage) #ifndef __REACTOS__ printf("CImage: %i tests executed (0 marked as todo, %i failures), 0 skipped.\n", g_tests_executed, g_tests_failed); + return g_tests_failed; #endif }