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
TESTDLL
=
ntprint.dll
C_SRCS
=
\
C_SRCS
=
\
...
...
dlls/ntprint/tests/ntprint.c
View file @
82ad9054
...
@@ -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 %
l
u (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 %
l
u (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 %
l
d
\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 %
l
u
\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 %
l
u (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 %
l
u
\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 %
l
u
\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 %l
u (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: %
l
u
\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 %l
u (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 %l
u
\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 %l
u (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 %l
u (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 %l
u (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 %l
u (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 %l
u (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
++
;
...
...
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