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
9089c3e1
Commit
9089c3e1
authored
Aug 03, 2009
by
Nicolas Le Cam
Committed by
Alexandre Julliard
Aug 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32/tests: Hardcode expected values when possible.
parent
d4159adb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
filedlg.c
dlls/comdlg32/tests/filedlg.c
+23
-22
No files found.
dlls/comdlg32/tests/filedlg.c
View file @
9089c3e1
...
...
@@ -102,26 +102,26 @@ static void test_DialogCancel(void)
ofn
.
lpstrInitialDir
=
szInitialDir
;
PrintDlgA
(
NULL
);
ok
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
"expected %d, got %d
\n
"
,
CDERR_INITIALIZATION
,
CommDlgExtendedError
());
ok
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
"expected CDERR_INITIALIZATION, got %d
\n
"
,
CommDlgExtendedError
());
result
=
GetOpenFileNameA
(
&
ofn
);
ok
(
0
==
result
,
"expected
%d, got %d
\n
"
,
0
,
result
);
ok
(
0
==
CommDlgExtendedError
(),
"expected
%d, got %d
\n
"
,
0
,
ok
(
0
==
result
,
"expected
0, got %d
\n
"
,
result
);
ok
(
0
==
CommDlgExtendedError
(),
"expected
0, got %d
\n
"
,
CommDlgExtendedError
());
PrintDlgA
(
NULL
);
ok
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
"expected %d, got %d
\n
"
,
CDERR_INITIALIZATION
,
CommDlgExtendedError
());
ok
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
"expected CDERR_INITIALIZATION, got %d
\n
"
,
CommDlgExtendedError
());
result
=
GetSaveFileNameA
(
&
ofn
);
ok
(
0
==
result
,
"expected
%d, got %d
\n
"
,
0
,
result
);
ok
(
0
==
CommDlgExtendedError
(),
"expected
%d, got %d
\n
"
,
0
,
ok
(
0
==
result
,
"expected
0, got %d
\n
"
,
result
);
ok
(
0
==
CommDlgExtendedError
(),
"expected
0, got %d
\n
"
,
CommDlgExtendedError
());
PrintDlgA
(
NULL
);
ok
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
"expected %d, got %d
\n
"
,
CDERR_INITIALIZATION
,
CommDlgExtendedError
());
ok
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
"expected CDERR_INITIALIZATION, got %d
\n
"
,
CommDlgExtendedError
());
/* Before passing the ofn to Unicode functions, remove the ANSI strings */
ofn
.
lpstrFilter
=
NULL
;
...
...
@@ -129,8 +129,8 @@ static void test_DialogCancel(void)
ofn
.
lpstrDefExt
=
NULL
;
PrintDlgA
(
NULL
);
ok
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
"expected %d, got %d
\n
"
,
CDERR_INITIALIZATION
,
CommDlgExtendedError
());
ok
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
"expected CDERR_INITIALIZATION, got %d
\n
"
,
CommDlgExtendedError
());
SetLastError
(
0xdeadbeef
);
result
=
GetOpenFileNameW
((
LPOPENFILENAMEW
)
&
ofn
);
...
...
@@ -138,11 +138,10 @@ static void test_DialogCancel(void)
win_skip
(
"GetOpenFileNameW is not implemented
\n
"
);
else
{
ok
(
0
==
result
,
"expected
%d, got %d
\n
"
,
0
,
result
);
ok
(
0
==
result
,
"expected
0, got %d
\n
"
,
result
);
ok
(
0
==
CommDlgExtendedError
()
||
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
/* win9x */
"expected %d or %d, got %d
\n
"
,
0
,
CDERR_INITIALIZATION
,
CommDlgExtendedError
());
broken
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
()),
/* win9x */
"expected 0, got %d
\n
"
,
CommDlgExtendedError
());
}
SetLastError
(
0xdeadbeef
);
...
...
@@ -151,11 +150,10 @@ static void test_DialogCancel(void)
win_skip
(
"GetSaveFileNameW is not implemented
\n
"
);
else
{
ok
(
0
==
result
,
"expected
%d, got %d
\n
"
,
0
,
result
);
ok
(
0
==
result
,
"expected
0, got %d
\n
"
,
result
);
ok
(
0
==
CommDlgExtendedError
()
||
CDERR_INITIALIZATION
==
CommDlgExtendedError
(),
/* win9x */
"expected %d or %d, got %d
\n
"
,
0
,
CDERR_INITIALIZATION
,
CommDlgExtendedError
());
broken
(
CDERR_INITIALIZATION
==
CommDlgExtendedError
()),
/* win9x */
"expected 0, got %d
\n
"
,
CommDlgExtendedError
());
}
}
...
...
@@ -206,7 +204,9 @@ static UINT_PTR CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wPa
hr
=
IShellView2_GetCurrentInfo
(
shell_view2
,
&
folder_settings
);
ok
(
SUCCEEDED
(
hr
),
"GetCurrentInfo returned %#x
\n
"
,
hr
);
ok
(
folder_settings
.
ViewMode
==
FVM_LIST
,
"view mode is %d, expected %d
\n
"
,
folder_settings
.
ViewMode
,
FVM_LIST
);
ok
(
folder_settings
.
ViewMode
==
FVM_LIST
,
"view mode is %d, expected FVM_LIST
\n
"
,
folder_settings
.
ViewMode
);
hr
=
IShellView2_DestroyViewWindow
(
shell_view2
);
ok
(
SUCCEEDED
(
hr
),
"DestroyViewWindow returned %#x
\n
"
,
hr
);
...
...
@@ -225,7 +225,8 @@ static UINT_PTR CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wPa
ok
(
SUCCEEDED
(
hr
),
"GetCurrentInfo returned %#x
\n
"
,
hr
);
ok
(
folder_settings
.
ViewMode
==
FVM_DETAILS
||
broken
(
folder_settings
.
ViewMode
==
FVM_LIST
),
/* Win9x */
"view mode is %d, expected %d
\n
"
,
folder_settings
.
ViewMode
,
FVM_DETAILS
);
"view mode is %d, expected FVM_DETAILS
\n
"
,
folder_settings
.
ViewMode
);
cleanup:
if
(
shell_view2
)
IShellView2_Release
(
shell_view2
);
...
...
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