Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
82ad9054
Commit
82ad9054
authored
Mar 02, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntprint/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f6c2330
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
17 deletions
+16
-17
Makefile.in
dlls/ntprint/tests/Makefile.in
+0
-1
ntprint.c
dlls/ntprint/tests/ntprint.c
+16
-16
No files found.
dlls/ntprint/tests/Makefile.in
View file @
82ad9054
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
ntprint.dll
C_SRCS
=
\
...
...
dlls/ntprint/tests/ntprint.c
View file @
82ad9054
...
...
@@ -76,19 +76,19 @@ static void test_PSetupCreateMonitorInfo(VOID)
win_skip
(
"The service 'Spooler' is required for many tests
\n
"
);
return
;
}
ok
(
mi
!=
NULL
,
"got %p with %u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
ok
(
mi
!=
NULL
,
"got %p with %
l
u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
if
(
mi
)
pPSetupDestroyMonitorInfo
(
mi
);
SetLastError
(
0xdeadbeef
);
mi
=
pPSetupCreateMonitorInfo
(
0
,
buffer
);
ok
(
mi
!=
NULL
,
"got %p with %u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
ok
(
mi
!=
NULL
,
"got %p with %
l
u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
if
(
mi
)
pPSetupDestroyMonitorInfo
(
mi
);
SetLastError
(
0xdeadbeef
);
mi
=
pPSetupCreateMonitorInfo
(
0
,
buffer
+
1
);
todo_wine
{
ok
(
mi
==
NULL
,
"got %p
\n
"
,
mi
);
ok
(
GetLastError
()
==
ERROR_INVALID_NAME
,
"got %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_INVALID_NAME
,
"got %
l
d
\n
"
,
GetLastError
()
);
}
if
(
mi
)
pPSetupDestroyMonitorInfo
(
mi
);
}
...
...
@@ -103,7 +103,7 @@ static void test_PSetupDestroyMonitorInfo(VOID)
SetLastError
(
0xdeadbeef
);
pPSetupDestroyMonitorInfo
(
NULL
);
/* lasterror is returned */
trace
(
"returned with %u
\n
"
,
GetLastError
());
trace
(
"returned with %
l
u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
mi
=
pPSetupCreateMonitorInfo
(
0
,
NULL
);
...
...
@@ -111,20 +111,20 @@ static void test_PSetupDestroyMonitorInfo(VOID)
win_skip
(
"The service 'Spooler' is required for many tests
\n
"
);
return
;
}
ok
(
mi
!=
NULL
,
"got %p with %u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
ok
(
mi
!=
NULL
,
"got %p with %
l
u (expected '!= NULL')
\n
"
,
mi
,
GetLastError
());
if
(
!
mi
)
return
;
SetLastError
(
0xdeadbeef
);
pPSetupDestroyMonitorInfo
(
mi
);
/* lasterror is returned */
trace
(
"returned with %u
\n
"
,
GetLastError
());
trace
(
"returned with %
l
u
\n
"
,
GetLastError
());
/* Trying to destroy the handle twice crashes with native ntprint.dll */
if
(
0
)
{
SetLastError
(
0xdeadbeef
);
pPSetupDestroyMonitorInfo
(
mi
);
trace
(
" with %u
\n
"
,
GetLastError
());
trace
(
" with %
l
u
\n
"
,
GetLastError
());
}
}
...
...
@@ -151,13 +151,13 @@ static void test_PSetupEnumMonitor(VOID)
SetLastError
(
0xdeadbeef
);
res
=
pPSetupEnumMonitor
(
mi
,
0
,
NULL
,
&
minsize
);
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 %l
u (expected '0' with ERROR_INSUFFICIENT_BUFFER "
"and '> 0')
\n
"
,
res
,
GetLastError
(),
minsize
);
size
=
ARRAY_SIZE
(
buffer
);
if
((
minsize
+
1
)
>
size
)
{
skip
(
"overflow: %u
\n
"
,
minsize
);
skip
(
"overflow: %
l
u
\n
"
,
minsize
);
pPSetupDestroyMonitorInfo
(
mi
);
return
;
}
...
...
@@ -168,7 +168,7 @@ static void test_PSetupEnumMonitor(VOID)
size
=
ARRAY_SIZE
(
buffer
);
res
=
pPSetupEnumMonitor
(
NULL
,
0
,
buffer
,
&
size
);
ok
(
!
res
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
"got %
u with %
u (expected '0' with ERROR_INVALID_PARAMETER)
\n
"
,
"got %
lu with %l
u (expected '0' with ERROR_INVALID_PARAMETER)
\n
"
,
res
,
GetLastError
());
}
...
...
@@ -177,7 +177,7 @@ static void test_PSetupEnumMonitor(VOID)
SetLastError
(
0xdeadbeef
);
size
=
ARRAY_SIZE
(
buffer
);
res
=
pPSetupEnumMonitor
(
mi
,
0
,
NULL
,
&
size
);
trace
(
"got %
u with %u and %
u
\n
"
,
res
,
GetLastError
(),
size
);
trace
(
"got %
lu with %lu and %l
u
\n
"
,
res
,
GetLastError
(),
size
);
}
if
(
0
)
{
...
...
@@ -185,7 +185,7 @@ static void test_PSetupEnumMonitor(VOID)
SetLastError
(
0xdeadbeef
);
res
=
pPSetupEnumMonitor
(
mi
,
0
,
buffer
,
NULL
);
ok
(
!
res
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
"got %
u with %
u (expected '0' with ERROR_INVALID_PARAMETER)
\n
"
,
"got %
lu with %l
u (expected '0' with ERROR_INVALID_PARAMETER)
\n
"
,
res
,
GetLastError
());
}
...
...
@@ -193,20 +193,20 @@ static void test_PSetupEnumMonitor(VOID)
size
=
minsize
-
1
;
res
=
pPSetupEnumMonitor
(
mi
,
0
,
buffer
,
&
size
);
ok
(
!
res
&&
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
),
"got %
u with %u and %
u (expected '0' with ERROR_INSUFFICIENT_BUFFER)
\n
"
,
"got %
lu with %lu and %l
u (expected '0' with ERROR_INSUFFICIENT_BUFFER)
\n
"
,
res
,
GetLastError
(),
size
);
SetLastError
(
0xdeadbeef
);
size
=
minsize
;
res
=
pPSetupEnumMonitor
(
mi
,
0
,
buffer
,
&
size
);
ok
(
res
,
"got %
u with %u and %
u (expected '!= 0')
\n
"
,
ok
(
res
,
"got %
lu with %lu and %l
u (expected '!= 0')
\n
"
,
res
,
GetLastError
(),
size
);
SetLastError
(
0xdeadbeef
);
size
=
minsize
+
1
;
res
=
pPSetupEnumMonitor
(
mi
,
0
,
buffer
,
&
size
);
ok
(
res
,
"got %
u with %u and %
u (expected '!= 0')
\n
"
,
ok
(
res
,
"got %
lu with %lu and %l
u (expected '!= 0')
\n
"
,
res
,
GetLastError
(),
size
);
/* try max. 20 monitors */
...
...
@@ -216,7 +216,7 @@ static void test_PSetupEnumMonitor(VOID)
size
=
ARRAY_SIZE
(
buffer
);
res
=
pPSetupEnumMonitor
(
mi
,
index
,
buffer
,
&
size
);
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 %l
u (expected '!=0' or: '0' with "
"ERROR_NO_MORE_ITEMS)
\n
"
,
index
,
res
,
GetLastError
(),
size
);
if
(
res
)
index
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment