From 3263e4fd825e9446ac46f2900fda5fdde3e09769 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 25 Apr 2012 12:42:40 +0000 Subject: [PATCH] {ROSTESTS] Fix compilation svn path=/trunk/; revision=56418 --- rostests/apitests/gdi32/CombineRgn.c | 21 +++++++++++++++------ rostests/apitests/gdi32/CombineTransform.c | 3 +-- rostests/apitests/gdi32/DPtoLP.c | 2 -- rostests/apitests/gdi32/GetDIBits.c | 2 -- rostests/apitests/gdi32/GetRandomRgn.c | 8 -------- rostests/apitests/gdi32/PatBlt.c | 8 -------- rostests/apitests/gdi32/SelectObject.c | 2 -- rostests/apitests/msvcrt/splitpath.c | 6 ------ rostests/apitests/ntdll/SystemInfo.c | 7 ------- 9 files changed, 16 insertions(+), 43 deletions(-) diff --git a/rostests/apitests/gdi32/CombineRgn.c b/rostests/apitests/gdi32/CombineRgn.c index 65b1ce779d3..192fd776872 100644 --- a/rostests/apitests/gdi32/CombineRgn.c +++ b/rostests/apitests/gdi32/CombineRgn.c @@ -9,13 +9,21 @@ #include #include -#define ok_long(expression, result) \ - { \ - int _value = (expression); \ - ok(_value == (result), "Wrong value for %s, expected " #result " (0x%x), got 0x%x\n", \ - #expression, (int)(result), _value); \ - } +void Test_CombineRgn_Params() +{ + HRGN hrgn1, hrgn2, hrgn3; + hrgn1 = CreateRectRgn(0, 0, 0, 0); + hrgn2 = CreateRectRgn(0, 0, 10, 10); + hrgn3 = CreateRectRgn(5, 5, 20, 20); + + SetLastError(0xbadbabe); + ok_long(CombineRgn(NULL, NULL, NULL, 0), ERROR); + ok_long(CombineRgn(hrgn1, hrgn2, hrgn3, 0), ERROR); + ok_long(CombineRgn(hrgn1, hrgn2, hrgn3, 6), ERROR); + ok_long(GetLastError(), 0xbadbabe); + +} void Test_CombineRgn_COPY() { @@ -189,6 +197,7 @@ void Test_CombineRgn_XOR() START_TEST(CombineRgn) { + Test_CombineRgn_Params(); Test_CombineRgn_COPY(); Test_CombineRgn_AND(); Test_CombineRgn_OR(); diff --git a/rostests/apitests/gdi32/CombineTransform.c b/rostests/apitests/gdi32/CombineTransform.c index 512fb4268fd..afa8a17ea8e 100644 --- a/rostests/apitests/gdi32/CombineTransform.c +++ b/rostests/apitests/gdi32/CombineTransform.c @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS api tests * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreatePen + * PURPOSE: Test for CombineTransform * PROGRAMMERS: Timo Kreuzer */ @@ -10,7 +10,6 @@ #include #include -#define ok_int(x, y) ok(x == y, "Wrong value for " #x ", expected " #y ", got %ld\n", (long)x); #define ok_flt(x, y) ok(x == y, "Wrong value for " #x ", expected " #y ", got %f\n", (double)x); #define ok_xform(xform, m11, m12, m21, m22, dx, dy) \ diff --git a/rostests/apitests/gdi32/DPtoLP.c b/rostests/apitests/gdi32/DPtoLP.c index 5ad6427a6e2..a3ca57416d3 100644 --- a/rostests/apitests/gdi32/DPtoLP.c +++ b/rostests/apitests/gdi32/DPtoLP.c @@ -9,8 +9,6 @@ #include #include -#define ok_int(x, y) ok(x == y, "Wrong value for " #x ", expected " #y ", got %ld\n", (long)x); - void Test_DPtoLP_Params() { BOOL ret; diff --git a/rostests/apitests/gdi32/GetDIBits.c b/rostests/apitests/gdi32/GetDIBits.c index 887581ddbcb..9c539dd2f9e 100644 --- a/rostests/apitests/gdi32/GetDIBits.c +++ b/rostests/apitests/gdi32/GetDIBits.c @@ -9,8 +9,6 @@ #include #include -#define ok_err(dwErr) ok(GetLastError() == dwErr, "LastError is wrong, expected %d, got %ld\n", dwErr, GetLastError()) - void Test_GetDIBits() { HDC hdcScreen, hdcMem; diff --git a/rostests/apitests/gdi32/GetRandomRgn.c b/rostests/apitests/gdi32/GetRandomRgn.c index 6b37c252c76..ce907645388 100644 --- a/rostests/apitests/gdi32/GetRandomRgn.c +++ b/rostests/apitests/gdi32/GetRandomRgn.c @@ -15,14 +15,6 @@ #define SYSRGN 4 #define RGN5 5 -#define ok_int(x, exp) \ - ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ - (int)__LINE__, #x, (int)(exp), (int)(x)) - -#define ok_long(x, exp) \ - ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ - (int)__LINE__, #x, (int)(exp), (int)(x)) - HWND ghwnd; HDC ghdcWindow; diff --git a/rostests/apitests/gdi32/PatBlt.c b/rostests/apitests/gdi32/PatBlt.c index 2e3a11719a2..04e7ce074b5 100644 --- a/rostests/apitests/gdi32/PatBlt.c +++ b/rostests/apitests/gdi32/PatBlt.c @@ -13,14 +13,6 @@ HBITMAP ghbmpTarget; PULONG gpulTargetBits; HDC hdcTarget; -#define ok_int(x, exp) \ - ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ - (int)__LINE__, #x, (int)(exp), (int)(x)) - -#define ok_long(x, exp) \ - ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ - (int)__LINE__, #x, (int)(exp), (int)(x)) - void Test_BrushOrigin() { ULONG aulBits[2] = {0x5555AAAA, 0}; diff --git a/rostests/apitests/gdi32/SelectObject.c b/rostests/apitests/gdi32/SelectObject.c index 06bf685d761..3049dd07895 100644 --- a/rostests/apitests/gdi32/SelectObject.c +++ b/rostests/apitests/gdi32/SelectObject.c @@ -15,8 +15,6 @@ #define TEST(x) ok(x, #x"\n") #define RTEST(x) ok(x, #x"\n") -#define ok_err(dwErr) ok(GetLastError() == dwErr, "Wrong LastError, expected %d, got %ld\n", dwErr, GetLastError()) - HDC hdc1, hdc2; static void diff --git a/rostests/apitests/msvcrt/splitpath.c b/rostests/apitests/msvcrt/splitpath.c index 687a38c9ea9..db4ae60c826 100644 --- a/rostests/apitests/msvcrt/splitpath.c +++ b/rostests/apitests/msvcrt/splitpath.c @@ -11,12 +11,6 @@ #include #include -#define ok_str(x, y) \ - ok(strcmp(x, y) == 0, "got '%s', expected '%s'\n", x, y); - -#define ok_int(x, y) \ - ok(x == y, "got %d, expected %d\n", x, y); - START_TEST(splitpath) { char drive[5]; diff --git a/rostests/apitests/ntdll/SystemInfo.c b/rostests/apitests/ntdll/SystemInfo.c index 2d3ac5687c6..40aaa8a0979 100644 --- a/rostests/apitests/ntdll/SystemInfo.c +++ b/rostests/apitests/ntdll/SystemInfo.c @@ -10,13 +10,6 @@ #include #include -#define ok_long(x, y) \ - ok(x == y, "got %ld, expected %ld\n", (long)x, (long)y); - -#define ok_ntstatus(status, expected) \ - ok(status == expected, "got 0x%lx, expected 0x%lx\n", status, expected); -// ok(status == expected, "expected: " ##expected## ", got 0x%lx\n", status) - void GetPrivilege() {