Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ef7a7794
Commit
ef7a7794
authored
Aug 09, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Aug 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32/tests: Add simple tests for PrintDlgA.
parent
2ca1de99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
printdlg.c
dlls/comdlg32/tests/printdlg.c
+46
-0
No files found.
dlls/comdlg32/tests/printdlg.c
View file @
ef7a7794
...
...
@@ -34,6 +34,51 @@
#include "wine/test.h"
/* ######## */
static
void
test_PageSetupDlgA
(
void
)
{
LPPAGESETUPDLGA
pDlg
;
DWORD
res
;
pDlg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
sizeof
(
PAGESETUPDLGA
))
*
2
);
if
(
!
pDlg
)
return
;
SetLastError
(
0xdeadbeef
);
res
=
PageSetupDlgA
(
NULL
);
ok
(
!
res
&&
(
CommDlgExtendedError
()
==
CDERR_INITIALIZATION
),
"returned %u with %u and 0x%x (expected '0' and "
"CDERR_INITIALIZATION)
\n
"
,
res
,
GetLastError
(),
CommDlgExtendedError
());
ZeroMemory
(
pDlg
,
sizeof
(
PAGESETUPDLGA
));
pDlg
->
lStructSize
=
sizeof
(
PAGESETUPDLGA
)
-
1
;
SetLastError
(
0xdeadbeef
);
res
=
PageSetupDlgA
(
pDlg
);
ok
(
!
res
&&
(
CommDlgExtendedError
()
==
CDERR_STRUCTSIZE
),
"returned %u with %u and 0x%x (expected '0' and "
"CDERR_STRUCTSIZE)
\n
"
,
res
,
GetLastError
(),
CommDlgExtendedError
());
ZeroMemory
(
pDlg
,
sizeof
(
PAGESETUPDLGA
));
pDlg
->
lStructSize
=
sizeof
(
PAGESETUPDLGA
);
pDlg
->
Flags
=
PSD_RETURNDEFAULT
;
SetLastError
(
0xdeadbeef
);
res
=
PageSetupDlgA
(
pDlg
);
ok
(
res
||
(
CommDlgExtendedError
()
==
PDERR_NODEFAULTPRN
),
"returned %u with %u and 0x%x (expected '!= 0' or '0' and "
"PDERR_NODEFAULTPRN)
\n
"
,
res
,
GetLastError
(),
CommDlgExtendedError
());
ok
(
pDlg
->
hDevMode
&&
pDlg
->
hDevNames
,
"got %p and %p (expected '!= NULL' for both)
\n
"
,
pDlg
->
hDevMode
,
pDlg
->
hDevNames
);
GlobalFree
(
pDlg
->
hDevMode
);
GlobalFree
(
pDlg
->
hDevNames
);
HeapFree
(
GetProcessHeap
(),
0
,
pDlg
);
}
/* ##### */
static
void
test_PrintDlgA
(
void
)
...
...
@@ -78,6 +123,7 @@ static void test_PrintDlgA(void)
START_TEST
(
printdlg
)
{
test_PageSetupDlgA
();
test_PrintDlgA
();
}
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