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
e011d0e3
Commit
e011d0e3
authored
Oct 15, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32/tests: Compile with -D__WINESRC__.
parent
947977f6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
11 deletions
+13
-11
Makefile.in
dlls/comdlg32/tests/Makefile.in
+0
-1
filedlg.c
dlls/comdlg32/tests/filedlg.c
+0
-0
finddlg.c
dlls/comdlg32/tests/finddlg.c
+3
-2
printdlg.c
dlls/comdlg32/tests/printdlg.c
+10
-8
No files found.
dlls/comdlg32/tests/Makefile.in
View file @
e011d0e3
TESTDLL
=
comdlg32.dll
IMPORTS
=
uuid shell32 ole32 comdlg32 winspool user32 gdi32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
filedlg.c
\
...
...
dlls/comdlg32/tests/filedlg.c
View file @
e011d0e3
This diff is collapsed.
Click to expand it.
dlls/comdlg32/tests/finddlg.c
View file @
e011d0e3
...
...
@@ -21,6 +21,7 @@
#include "windows.h"
#include "commdlg.h"
#include "cderr.h"
#include "wine/test.h"
static
UINT
ID_FINDMSGSTRING
;
...
...
@@ -35,7 +36,7 @@ static LRESULT CALLBACK OwnerWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if
(
msg
==
ID_FINDMSGSTRING
)
{
return
handle_findmsg
((
FINDREPLACEA
*
)
lParam
);
}
return
DefWindowProc
(
hwnd
,
msg
,
wParam
,
lParam
);
return
DefWindowProc
A
(
hwnd
,
msg
,
wParam
,
lParam
);
}
static
void
test_param_check
(
void
)
...
...
@@ -126,7 +127,7 @@ static void test_param_check(void)
CHECK_FINDREPLACE_FAIL
(
CDERR_FINDRESFAILURE
);
fr
.
Flags
=
FR_ENABLETEMPLATEHANDLE
;
CHECK_FINDREPLACE_FAIL
(
CDERR_NOHINSTANCE
);
fr
.
hInstance
=
GetModuleHandle
(
NULL
);
fr
.
hInstance
=
GetModuleHandle
A
(
NULL
);
/* invalid lpTemplateName (NULL) when Flags has FR_ENABLETEMPLATE */
fr
.
Flags
=
FR_ENABLETEMPLATE
;
...
...
dlls/comdlg32/tests/printdlg.c
View file @
e011d0e3
...
...
@@ -35,6 +35,8 @@
#include "cderr.h"
#include "commdlg.h"
#include "dlgs.h"
#include "winspool.h"
#include "wine/test.h"
...
...
@@ -131,7 +133,7 @@ static UINT_PTR CALLBACK print_hook_proc(HWND hdlg, UINT msg, WPARAM wp, LPARAM
/* some driver popup a dialog and hung the test or silently limit the number of copies,
when trying to set more than 999 copies */
SetDlgItemInt
(
hdlg
,
edt3
,
123
,
FALSE
);
PostMessage
(
hdlg
,
WM_COMMAND
,
IDOK
,
FALSE
);
PostMessage
A
(
hdlg
,
WM_COMMAND
,
IDOK
,
FALSE
);
}
return
0
;
}
...
...
@@ -146,7 +148,7 @@ static void test_PrintDlgA(void)
LPCSTR
port
;
CHAR
buffer
[
MAX_PATH
];
LPSTR
ptr
;
DEVMODE
*
dm
;
DEVMODE
A
*
dm
;
pDlg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
sizeof
(
PRINTDLGA
))
*
2
);
if
(
!
pDlg
)
return
;
...
...
@@ -230,7 +232,7 @@ static void test_PrintDlgA(void)
ok
(
lstrcmpiA
(
driver
,
buffer
)
==
0
,
"got driver '%s' (expected '%s')
\n
"
,
driver
,
buffer
);
n_copies
=
DeviceCapabilities
(
device
,
port
,
DC_COPIES
,
NULL
,
NULL
);
n_copies
=
DeviceCapabilities
A
(
device
,
port
,
DC_COPIES
,
NULL
,
NULL
);
ok
(
n_copies
>
0
,
"DeviceCapabilities(DC_COPIES) failed
\n
"
);
}
...
...
@@ -249,7 +251,7 @@ static void test_PrintDlgA(void)
pDlg
->
lStructSize
=
sizeof
(
*
pDlg
);
pDlg
->
Flags
=
PD_ENABLEPRINTHOOK
;
pDlg
->
lpfnPrintHook
=
print_hook_proc
;
res
=
PrintDlg
(
pDlg
);
res
=
PrintDlg
A
(
pDlg
);
ok
(
res
,
"PrintDlg error %#x
\n
"
,
CommDlgExtendedError
());
/* Version of Microsoft XPS Document Writer driver shipped before Win7
* reports that it can print multiple copies, but returns 1.
...
...
@@ -268,7 +270,7 @@ static void test_PrintDlgA(void)
pDlg
->
lStructSize
=
sizeof
(
*
pDlg
);
pDlg
->
Flags
=
PD_ENABLEPRINTHOOK
|
PD_USEDEVMODECOPIES
;
pDlg
->
lpfnPrintHook
=
print_hook_proc
;
res
=
PrintDlg
(
pDlg
);
res
=
PrintDlg
A
(
pDlg
);
ok
(
res
,
"PrintDlg error %#x
\n
"
,
CommDlgExtendedError
());
ok
(
pDlg
->
nCopies
==
1
,
"expected nCopies 1, got %d
\n
"
,
pDlg
->
nCopies
);
ok
(
pDlg
->
hDevMode
!=
0
,
"hDevMode should not be 0
\n
"
);
...
...
@@ -390,7 +392,7 @@ static void test_PrintDlgExW(void)
}
/* Set CommDlgExtendedError != 0 */
PrintDlg
(
NULL
);
PrintDlg
A
(
NULL
);
SetLastError
(
0xdeadbeef
);
res
=
pPrintDlgExW
(
NULL
);
ok
(
(
res
==
E_INVALIDARG
),
...
...
@@ -404,7 +406,7 @@ static void test_PrintDlgExW(void)
/* lStructSize must be exact */
ZeroMemory
(
pDlg
,
sizeof
(
PRINTDLGEXW
));
pDlg
->
lStructSize
=
sizeof
(
PRINTDLGEXW
)
-
1
;
PrintDlg
(
NULL
);
PrintDlg
A
(
NULL
);
SetLastError
(
0xdeadbeef
);
res
=
pPrintDlgExW
(
pDlg
);
ok
(
(
res
==
E_INVALIDARG
),
...
...
@@ -414,7 +416,7 @@ static void test_PrintDlgExW(void)
ZeroMemory
(
pDlg
,
sizeof
(
PRINTDLGEXW
));
pDlg
->
lStructSize
=
sizeof
(
PRINTDLGEXW
)
+
1
;
PrintDlg
(
NULL
);
PrintDlg
A
(
NULL
);
SetLastError
(
0xdeadbeef
);
res
=
pPrintDlgExW
(
pDlg
);
ok
(
(
res
==
E_INVALIDARG
),
...
...
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