Commit 82ad9054 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

ntprint/tests: Enable compilation with long types.

parent 7f6c2330
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = ntprint.dll TESTDLL = ntprint.dll
C_SRCS = \ C_SRCS = \
......
...@@ -76,19 +76,19 @@ static void test_PSetupCreateMonitorInfo(VOID) ...@@ -76,19 +76,19 @@ static void test_PSetupCreateMonitorInfo(VOID)
win_skip("The service 'Spooler' is required for many tests\n"); win_skip("The service 'Spooler' is required for many tests\n");
return; return;
} }
ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); ok( mi != NULL, "got %p with %lu (expected '!= NULL')\n", mi, GetLastError());
if (mi) pPSetupDestroyMonitorInfo(mi); if (mi) pPSetupDestroyMonitorInfo(mi);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
mi = pPSetupCreateMonitorInfo(0, buffer); mi = pPSetupCreateMonitorInfo(0, buffer);
ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); ok( mi != NULL, "got %p with %lu (expected '!= NULL')\n", mi, GetLastError());
if (mi) pPSetupDestroyMonitorInfo(mi); if (mi) pPSetupDestroyMonitorInfo(mi);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
mi = pPSetupCreateMonitorInfo(0, buffer + 1); mi = pPSetupCreateMonitorInfo(0, buffer + 1);
todo_wine { todo_wine {
ok( mi == NULL, "got %p\n", mi ); ok( mi == NULL, "got %p\n", mi );
ok( GetLastError() == ERROR_INVALID_NAME, "got %d\n", GetLastError() ); ok( GetLastError() == ERROR_INVALID_NAME, "got %ld\n", GetLastError() );
} }
if (mi) pPSetupDestroyMonitorInfo(mi); if (mi) pPSetupDestroyMonitorInfo(mi);
} }
...@@ -103,7 +103,7 @@ static void test_PSetupDestroyMonitorInfo(VOID) ...@@ -103,7 +103,7 @@ static void test_PSetupDestroyMonitorInfo(VOID)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
pPSetupDestroyMonitorInfo(NULL); pPSetupDestroyMonitorInfo(NULL);
/* lasterror is returned */ /* lasterror is returned */
trace("returned with %u\n", GetLastError()); trace("returned with %lu\n", GetLastError());
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
mi = pPSetupCreateMonitorInfo(0, NULL); mi = pPSetupCreateMonitorInfo(0, NULL);
...@@ -111,20 +111,20 @@ static void test_PSetupDestroyMonitorInfo(VOID) ...@@ -111,20 +111,20 @@ static void test_PSetupDestroyMonitorInfo(VOID)
win_skip("The service 'Spooler' is required for many tests\n"); win_skip("The service 'Spooler' is required for many tests\n");
return; return;
} }
ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); ok( mi != NULL, "got %p with %lu (expected '!= NULL')\n", mi, GetLastError());
if (!mi) return; if (!mi) return;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
pPSetupDestroyMonitorInfo(mi); pPSetupDestroyMonitorInfo(mi);
/* lasterror is returned */ /* lasterror is returned */
trace("returned with %u\n", GetLastError()); trace("returned with %lu\n", GetLastError());
/* Trying to destroy the handle twice crashes with native ntprint.dll */ /* Trying to destroy the handle twice crashes with native ntprint.dll */
if (0) { if (0) {
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
pPSetupDestroyMonitorInfo(mi); pPSetupDestroyMonitorInfo(mi);
trace(" with %u\n", GetLastError()); trace(" with %lu\n", GetLastError());
} }
} }
...@@ -151,13 +151,13 @@ static void test_PSetupEnumMonitor(VOID) ...@@ -151,13 +151,13 @@ static void test_PSetupEnumMonitor(VOID)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
res = pPSetupEnumMonitor(mi, 0, NULL, &minsize); res = pPSetupEnumMonitor(mi, 0, NULL, &minsize);
ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER) && (minsize > 0), ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER) && (minsize > 0),
"got %u with %u and %u (expected '0' with ERROR_INSUFFICIENT_BUFFER " "got %lu with %lu and %lu (expected '0' with ERROR_INSUFFICIENT_BUFFER "
"and '> 0')\n", res, GetLastError(), minsize); "and '> 0')\n", res, GetLastError(), minsize);
size = ARRAY_SIZE(buffer); size = ARRAY_SIZE(buffer);
if ((minsize + 1) > size) { if ((minsize + 1) > size) {
skip("overflow: %u\n", minsize); skip("overflow: %lu\n", minsize);
pPSetupDestroyMonitorInfo(mi); pPSetupDestroyMonitorInfo(mi);
return; return;
} }
...@@ -168,7 +168,7 @@ static void test_PSetupEnumMonitor(VOID) ...@@ -168,7 +168,7 @@ static void test_PSetupEnumMonitor(VOID)
size = ARRAY_SIZE(buffer); size = ARRAY_SIZE(buffer);
res = pPSetupEnumMonitor(NULL, 0, buffer, &size); res = pPSetupEnumMonitor(NULL, 0, buffer, &size);
ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER),
"got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", "got %lu with %lu (expected '0' with ERROR_INVALID_PARAMETER)\n",
res, GetLastError()); res, GetLastError());
} }
...@@ -177,7 +177,7 @@ static void test_PSetupEnumMonitor(VOID) ...@@ -177,7 +177,7 @@ static void test_PSetupEnumMonitor(VOID)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
size = ARRAY_SIZE(buffer); size = ARRAY_SIZE(buffer);
res = pPSetupEnumMonitor(mi, 0, NULL, &size); res = pPSetupEnumMonitor(mi, 0, NULL, &size);
trace("got %u with %u and %u\n", res, GetLastError(), size); trace("got %lu with %lu and %lu\n", res, GetLastError(), size);
} }
if (0) { if (0) {
...@@ -185,7 +185,7 @@ static void test_PSetupEnumMonitor(VOID) ...@@ -185,7 +185,7 @@ static void test_PSetupEnumMonitor(VOID)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
res = pPSetupEnumMonitor(mi, 0, buffer, NULL); res = pPSetupEnumMonitor(mi, 0, buffer, NULL);
ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER),
"got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", "got %lu with %lu (expected '0' with ERROR_INVALID_PARAMETER)\n",
res, GetLastError()); res, GetLastError());
} }
...@@ -193,20 +193,20 @@ static void test_PSetupEnumMonitor(VOID) ...@@ -193,20 +193,20 @@ static void test_PSetupEnumMonitor(VOID)
size = minsize - 1; size = minsize - 1;
res = pPSetupEnumMonitor(mi, 0, buffer, &size); res = pPSetupEnumMonitor(mi, 0, buffer, &size);
ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER),
"got %u with %u and %u (expected '0' with ERROR_INSUFFICIENT_BUFFER)\n", "got %lu with %lu and %lu (expected '0' with ERROR_INSUFFICIENT_BUFFER)\n",
res, GetLastError(), size); res, GetLastError(), size);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
size = minsize; size = minsize;
res = pPSetupEnumMonitor(mi, 0, buffer, &size); res = pPSetupEnumMonitor(mi, 0, buffer, &size);
ok( res, "got %u with %u and %u (expected '!= 0')\n", ok( res, "got %lu with %lu and %lu (expected '!= 0')\n",
res, GetLastError(), size); res, GetLastError(), size);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
size = minsize + 1; size = minsize + 1;
res = pPSetupEnumMonitor(mi, 0, buffer, &size); res = pPSetupEnumMonitor(mi, 0, buffer, &size);
ok( res, "got %u with %u and %u (expected '!= 0')\n", ok( res, "got %lu with %lu and %lu (expected '!= 0')\n",
res, GetLastError(), size); res, GetLastError(), size);
/* try max. 20 monitors */ /* try max. 20 monitors */
...@@ -216,7 +216,7 @@ static void test_PSetupEnumMonitor(VOID) ...@@ -216,7 +216,7 @@ static void test_PSetupEnumMonitor(VOID)
size = ARRAY_SIZE(buffer); size = ARRAY_SIZE(buffer);
res = pPSetupEnumMonitor(mi, index, buffer, &size); res = pPSetupEnumMonitor(mi, index, buffer, &size);
ok( res || (GetLastError() == ERROR_NO_MORE_ITEMS), ok( res || (GetLastError() == ERROR_NO_MORE_ITEMS),
"(%u) got %u with %u and %u (expected '!=0' or: '0' with " "(%lu) got %lu with %lu and %lu (expected '!=0' or: '0' with "
"ERROR_NO_MORE_ITEMS)\n", index, res, GetLastError(), size); "ERROR_NO_MORE_ITEMS)\n", index, res, GetLastError(), size);
if (res) index++; if (res) index++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment