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
Hide 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
TESTDLL
=
comdlg32.dll
IMPORTS
=
uuid shell32 ole32 comdlg32 winspool user32 gdi32
IMPORTS
=
uuid shell32 ole32 comdlg32 winspool user32 gdi32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
C_SRCS
=
\
filedlg.c
\
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 @@
...
@@ -21,6 +21,7 @@
#include "windows.h"
#include "windows.h"
#include "commdlg.h"
#include "commdlg.h"
#include "cderr.h"
#include "wine/test.h"
#include "wine/test.h"
static
UINT
ID_FINDMSGSTRING
;
static
UINT
ID_FINDMSGSTRING
;
...
@@ -35,7 +36,7 @@ static LRESULT CALLBACK OwnerWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
...
@@ -35,7 +36,7 @@ static LRESULT CALLBACK OwnerWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if
(
msg
==
ID_FINDMSGSTRING
)
{
if
(
msg
==
ID_FINDMSGSTRING
)
{
return
handle_findmsg
((
FINDREPLACEA
*
)
lParam
);
return
handle_findmsg
((
FINDREPLACEA
*
)
lParam
);
}
}
return
DefWindowProc
(
hwnd
,
msg
,
wParam
,
lParam
);
return
DefWindowProc
A
(
hwnd
,
msg
,
wParam
,
lParam
);
}
}
static
void
test_param_check
(
void
)
static
void
test_param_check
(
void
)
...
@@ -126,7 +127,7 @@ static void test_param_check(void)
...
@@ -126,7 +127,7 @@ static void test_param_check(void)
CHECK_FINDREPLACE_FAIL
(
CDERR_FINDRESFAILURE
);
CHECK_FINDREPLACE_FAIL
(
CDERR_FINDRESFAILURE
);
fr
.
Flags
=
FR_ENABLETEMPLATEHANDLE
;
fr
.
Flags
=
FR_ENABLETEMPLATEHANDLE
;
CHECK_FINDREPLACE_FAIL
(
CDERR_NOHINSTANCE
);
CHECK_FINDREPLACE_FAIL
(
CDERR_NOHINSTANCE
);
fr
.
hInstance
=
GetModuleHandle
(
NULL
);
fr
.
hInstance
=
GetModuleHandle
A
(
NULL
);
/* invalid lpTemplateName (NULL) when Flags has FR_ENABLETEMPLATE */
/* invalid lpTemplateName (NULL) when Flags has FR_ENABLETEMPLATE */
fr
.
Flags
=
FR_ENABLETEMPLATE
;
fr
.
Flags
=
FR_ENABLETEMPLATE
;
...
...
dlls/comdlg32/tests/printdlg.c
View file @
e011d0e3
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
#include "cderr.h"
#include "cderr.h"
#include "commdlg.h"
#include "commdlg.h"
#include "dlgs.h"
#include "winspool.h"
#include "wine/test.h"
#include "wine/test.h"
...
@@ -131,7 +133,7 @@ static UINT_PTR CALLBACK print_hook_proc(HWND hdlg, UINT msg, WPARAM wp, LPARAM
...
@@ -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,
/* some driver popup a dialog and hung the test or silently limit the number of copies,
when trying to set more than 999 copies */
when trying to set more than 999 copies */
SetDlgItemInt
(
hdlg
,
edt3
,
123
,
FALSE
);
SetDlgItemInt
(
hdlg
,
edt3
,
123
,
FALSE
);
PostMessage
(
hdlg
,
WM_COMMAND
,
IDOK
,
FALSE
);
PostMessage
A
(
hdlg
,
WM_COMMAND
,
IDOK
,
FALSE
);
}
}
return
0
;
return
0
;
}
}
...
@@ -146,7 +148,7 @@ static void test_PrintDlgA(void)
...
@@ -146,7 +148,7 @@ static void test_PrintDlgA(void)
LPCSTR
port
;
LPCSTR
port
;
CHAR
buffer
[
MAX_PATH
];
CHAR
buffer
[
MAX_PATH
];
LPSTR
ptr
;
LPSTR
ptr
;
DEVMODE
*
dm
;
DEVMODE
A
*
dm
;
pDlg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
sizeof
(
PRINTDLGA
))
*
2
);
pDlg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
sizeof
(
PRINTDLGA
))
*
2
);
if
(
!
pDlg
)
return
;
if
(
!
pDlg
)
return
;
...
@@ -230,7 +232,7 @@ static void test_PrintDlgA(void)
...
@@ -230,7 +232,7 @@ static void test_PrintDlgA(void)
ok
(
lstrcmpiA
(
driver
,
buffer
)
==
0
,
ok
(
lstrcmpiA
(
driver
,
buffer
)
==
0
,
"got driver '%s' (expected '%s')
\n
"
,
driver
,
buffer
);
"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
"
);
ok
(
n_copies
>
0
,
"DeviceCapabilities(DC_COPIES) failed
\n
"
);
}
}
...
@@ -249,7 +251,7 @@ static void test_PrintDlgA(void)
...
@@ -249,7 +251,7 @@ static void test_PrintDlgA(void)
pDlg
->
lStructSize
=
sizeof
(
*
pDlg
);
pDlg
->
lStructSize
=
sizeof
(
*
pDlg
);
pDlg
->
Flags
=
PD_ENABLEPRINTHOOK
;
pDlg
->
Flags
=
PD_ENABLEPRINTHOOK
;
pDlg
->
lpfnPrintHook
=
print_hook_proc
;
pDlg
->
lpfnPrintHook
=
print_hook_proc
;
res
=
PrintDlg
(
pDlg
);
res
=
PrintDlg
A
(
pDlg
);
ok
(
res
,
"PrintDlg error %#x
\n
"
,
CommDlgExtendedError
());
ok
(
res
,
"PrintDlg error %#x
\n
"
,
CommDlgExtendedError
());
/* Version of Microsoft XPS Document Writer driver shipped before Win7
/* Version of Microsoft XPS Document Writer driver shipped before Win7
* reports that it can print multiple copies, but returns 1.
* reports that it can print multiple copies, but returns 1.
...
@@ -268,7 +270,7 @@ static void test_PrintDlgA(void)
...
@@ -268,7 +270,7 @@ static void test_PrintDlgA(void)
pDlg
->
lStructSize
=
sizeof
(
*
pDlg
);
pDlg
->
lStructSize
=
sizeof
(
*
pDlg
);
pDlg
->
Flags
=
PD_ENABLEPRINTHOOK
|
PD_USEDEVMODECOPIES
;
pDlg
->
Flags
=
PD_ENABLEPRINTHOOK
|
PD_USEDEVMODECOPIES
;
pDlg
->
lpfnPrintHook
=
print_hook_proc
;
pDlg
->
lpfnPrintHook
=
print_hook_proc
;
res
=
PrintDlg
(
pDlg
);
res
=
PrintDlg
A
(
pDlg
);
ok
(
res
,
"PrintDlg error %#x
\n
"
,
CommDlgExtendedError
());
ok
(
res
,
"PrintDlg error %#x
\n
"
,
CommDlgExtendedError
());
ok
(
pDlg
->
nCopies
==
1
,
"expected nCopies 1, got %d
\n
"
,
pDlg
->
nCopies
);
ok
(
pDlg
->
nCopies
==
1
,
"expected nCopies 1, got %d
\n
"
,
pDlg
->
nCopies
);
ok
(
pDlg
->
hDevMode
!=
0
,
"hDevMode should not be 0
\n
"
);
ok
(
pDlg
->
hDevMode
!=
0
,
"hDevMode should not be 0
\n
"
);
...
@@ -390,7 +392,7 @@ static void test_PrintDlgExW(void)
...
@@ -390,7 +392,7 @@ static void test_PrintDlgExW(void)
}
}
/* Set CommDlgExtendedError != 0 */
/* Set CommDlgExtendedError != 0 */
PrintDlg
(
NULL
);
PrintDlg
A
(
NULL
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
res
=
pPrintDlgExW
(
NULL
);
res
=
pPrintDlgExW
(
NULL
);
ok
(
(
res
==
E_INVALIDARG
),
ok
(
(
res
==
E_INVALIDARG
),
...
@@ -404,7 +406,7 @@ static void test_PrintDlgExW(void)
...
@@ -404,7 +406,7 @@ static void test_PrintDlgExW(void)
/* lStructSize must be exact */
/* lStructSize must be exact */
ZeroMemory
(
pDlg
,
sizeof
(
PRINTDLGEXW
));
ZeroMemory
(
pDlg
,
sizeof
(
PRINTDLGEXW
));
pDlg
->
lStructSize
=
sizeof
(
PRINTDLGEXW
)
-
1
;
pDlg
->
lStructSize
=
sizeof
(
PRINTDLGEXW
)
-
1
;
PrintDlg
(
NULL
);
PrintDlg
A
(
NULL
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
res
=
pPrintDlgExW
(
pDlg
);
res
=
pPrintDlgExW
(
pDlg
);
ok
(
(
res
==
E_INVALIDARG
),
ok
(
(
res
==
E_INVALIDARG
),
...
@@ -414,7 +416,7 @@ static void test_PrintDlgExW(void)
...
@@ -414,7 +416,7 @@ static void test_PrintDlgExW(void)
ZeroMemory
(
pDlg
,
sizeof
(
PRINTDLGEXW
));
ZeroMemory
(
pDlg
,
sizeof
(
PRINTDLGEXW
));
pDlg
->
lStructSize
=
sizeof
(
PRINTDLGEXW
)
+
1
;
pDlg
->
lStructSize
=
sizeof
(
PRINTDLGEXW
)
+
1
;
PrintDlg
(
NULL
);
PrintDlg
A
(
NULL
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
res
=
pPrintDlgExW
(
pDlg
);
res
=
pPrintDlgExW
(
pDlg
);
ok
(
(
res
==
E_INVALIDARG
),
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