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
a0ec5fec
Commit
a0ec5fec
authored
Feb 15, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Use todo_wine_if() in tests.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1bb4b7ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
65 deletions
+17
-65
file.c
dlls/kernel32/tests/file.c
+6
-11
loader.c
dlls/kernel32/tests/loader.c
+4
-16
locale.c
dlls/kernel32/tests/locale.c
+7
-38
No files found.
dlls/kernel32/tests/file.c
View file @
a0ec5fec
...
...
@@ -1325,20 +1325,15 @@ static void test_CreateFileA(void)
skip
(
"Do not have authority to access volumes. Test for %s skipped
\n
"
,
filename
);
}
/* otherwise validate results with expectations */
else
if
(
p
[
i
].
todo_flag
)
todo_wine
ok
(
(
hFile
==
INVALID_HANDLE_VALUE
&&
(
p
[
i
].
err
==
GetLastError
()
||
p
[
i
].
err2
==
GetLastError
()))
||
(
hFile
!=
INVALID_HANDLE_VALUE
&&
p
[
i
].
err
==
ERROR_SUCCESS
),
"CreateFileA failed on %s, hFile %p, err=%u, should be %u
\n
"
,
filename
,
hFile
,
GetLastError
(),
p
[
i
].
err
);
else
ok
(
(
hFile
==
INVALID_HANDLE_VALUE
&&
(
p
[
i
].
err
==
GetLastError
()
||
p
[
i
].
err2
==
GetLastError
()))
||
(
hFile
!=
INVALID_HANDLE_VALUE
&&
p
[
i
].
err
==
ERROR_SUCCESS
),
{
todo_wine_if
(
p
[
i
].
todo_flag
)
ok
((
hFile
==
INVALID_HANDLE_VALUE
&&
(
p
[
i
].
err
==
GetLastError
()
||
p
[
i
].
err2
==
GetLastError
()))
||
(
hFile
!=
INVALID_HANDLE_VALUE
&&
p
[
i
].
err
==
ERROR_SUCCESS
),
"CreateFileA failed on %s, hFile %p, err=%u, should be %u
\n
"
,
filename
,
hFile
,
GetLastError
(),
p
[
i
].
err
);
}
if
(
hFile
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
hFile
);
i
++
;
...
...
dlls/kernel32/tests/loader.c
View file @
a0ec5fec
...
...
@@ -452,10 +452,7 @@ static void test_Loader(void)
ptr
=
VirtualAlloc
(
hlib
,
page_size
,
MEM_COMMIT
,
info
.
Protect
);
ok
(
!
ptr
,
"%d: VirtualAlloc should fail
\n
"
,
i
);
/* FIXME: Remove once Wine is fixed */
if
(
info
.
Protect
==
PAGE_WRITECOPY
||
info
.
Protect
==
PAGE_EXECUTE_WRITECOPY
)
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"%d: expected ERROR_ACCESS_DENIED, got %d
\n
"
,
i
,
GetLastError
());
else
todo_wine_if
(
info
.
Protect
==
PAGE_WRITECOPY
||
info
.
Protect
==
PAGE_EXECUTE_WRITECOPY
)
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"%d: expected ERROR_ACCESS_DENIED, got %d
\n
"
,
i
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
...
...
@@ -541,11 +538,7 @@ todo_wine
ptr
=
VirtualAlloc
((
char
*
)
hlib
+
section
.
VirtualAddress
,
page_size
,
MEM_COMMIT
,
info
.
Protect
);
ok
(
!
ptr
,
"%d: VirtualAlloc should fail
\n
"
,
i
);
/* FIXME: Remove once Wine is fixed */
if
(
info
.
Protect
==
PAGE_WRITECOPY
||
info
.
Protect
==
PAGE_EXECUTE_WRITECOPY
)
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
||
GetLastError
()
==
ERROR_INVALID_ADDRESS
,
"%d: expected ERROR_ACCESS_DENIED, got %d
\n
"
,
i
,
GetLastError
());
else
todo_wine_if
(
info
.
Protect
==
PAGE_WRITECOPY
||
info
.
Protect
==
PAGE_EXECUTE_WRITECOPY
)
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
||
GetLastError
()
==
ERROR_INVALID_ADDRESS
,
"%d: expected ERROR_ACCESS_DENIED, got %d
\n
"
,
i
,
GetLastError
());
}
...
...
@@ -1139,9 +1132,7 @@ static void test_section_access(void)
size
=
VirtualQuery
((
char
*
)
hlib
+
section
.
VirtualAddress
,
&
info
,
sizeof
(
info
));
ok
(
size
==
sizeof
(
info
),
"%d: VirtualQuery error %d
\n
"
,
i
,
GetLastError
());
/* FIXME: remove the condition below once Wine is fixed */
if
(
info
.
Protect
==
PAGE_WRITECOPY
||
info
.
Protect
==
PAGE_EXECUTE_WRITECOPY
)
todo_wine
ok
(
info
.
Protect
==
td
[
i
].
scn_page_access_after_write
,
"%d: got %#x != expected %#x
\n
"
,
i
,
info
.
Protect
,
td
[
i
].
scn_page_access_after_write
);
else
todo_wine_if
(
info
.
Protect
==
PAGE_WRITECOPY
||
info
.
Protect
==
PAGE_EXECUTE_WRITECOPY
)
ok
(
info
.
Protect
==
td
[
i
].
scn_page_access_after_write
,
"%d: got %#x != expected %#x
\n
"
,
i
,
info
.
Protect
,
td
[
i
].
scn_page_access_after_write
);
}
...
...
@@ -1498,10 +1489,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
ret
=
pRtlDllShutdownInProgress
();
/* FIXME: remove once Wine is fixed */
if
(
expected_code
==
STILL_ACTIVE
||
expected_code
==
196
)
ok
(
!
ret
||
broken
(
ret
)
/* before Vista */
,
"RtlDllShutdownInProgress returned %d
\n
"
,
ret
);
else
todo_wine
todo_wine_if
(
!
(
expected_code
==
STILL_ACTIVE
||
expected_code
==
196
))
ok
(
!
ret
||
broken
(
ret
)
/* before Vista */
,
"RtlDllShutdownInProgress returned %d
\n
"
,
ret
);
}
...
...
dlls/kernel32/tests/locale.c
View file @
a0ec5fec
...
...
@@ -329,24 +329,13 @@ static void test_GetLocaleInfoW(void)
val
=
0
;
GetLocaleInfoW
(
lcid
,
LOCALE_ILANGUAGE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
sizeof
(
val
)
/
sizeof
(
WCHAR
));
if
(
ptr
->
todo
&
0x1
)
{
todo_wine
ok
(
val
==
ptr
->
lcid
||
(
val
&&
broken
(
val
==
ptr
->
lcid_broken
)),
"%s: got wrong lcid 0x%04x, expected 0x%04x
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
val
,
ptr
->
lcid
);
}
else
todo_wine_if
(
ptr
->
todo
&
0x1
)
ok
(
val
==
ptr
->
lcid
||
(
val
&&
broken
(
val
==
ptr
->
lcid_broken
)),
"%s: got wrong lcid 0x%04x, expected 0x%04x
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
val
,
ptr
->
lcid
);
/* now check LOCALE_SNAME */
GetLocaleInfoW
(
lcid
,
LOCALE_SNAME
,
bufferW
,
COUNTOF
(
bufferW
));
if
(
ptr
->
todo
&
0x2
)
todo_wine
ok
(
!
lstrcmpW
(
bufferW
,
ptr
->
sname
)
||
(
*
ptr
->
sname_broken
&&
broken
(
!
lstrcmpW
(
bufferW
,
ptr
->
sname_broken
))),
"%s: got %s
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
wine_dbgstr_w
(
bufferW
));
else
todo_wine_if
(
ptr
->
todo
&
0x2
)
ok
(
!
lstrcmpW
(
bufferW
,
ptr
->
sname
)
||
(
*
ptr
->
sname_broken
&&
broken
(
!
lstrcmpW
(
bufferW
,
ptr
->
sname_broken
))),
"%s: got %s
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
wine_dbgstr_w
(
bufferW
));
...
...
@@ -2010,16 +1999,9 @@ static void test_CompareStringEx(void)
MultiByteToWideChar
(
CP_ACP
,
0
,
e
->
locale
,
-
1
,
locale
,
sizeof
(
locale
)
/
sizeof
(
WCHAR
));
ret
=
pCompareStringEx
(
locale
,
e
->
flags
,
e
->
first
,
-
1
,
e
->
second
,
-
1
,
NULL
,
NULL
,
0
);
if
(
e
->
todo
)
{
todo_wine
ok
(
ret
==
e
->
ret
||
broken
(
ret
==
e
->
broken
),
"%d: got %s, expected %s
\n
"
,
i
,
op
[
ret
],
op
[
e
->
ret
]);
}
else
{
todo_wine_if
(
e
->
todo
)
ok
(
ret
==
e
->
ret
||
broken
(
ret
==
e
->
broken
),
"%d: got %s, expected %s
\n
"
,
i
,
op
[
ret
],
op
[
e
->
ret
]);
}
}
}
...
...
@@ -2486,11 +2468,7 @@ static void test_LocaleNameToLCID(void)
while
(
*
ptr
->
name
)
{
lcid
=
pLocaleNameToLCID
(
ptr
->
name
,
0
);
if
(
ptr
->
todo
)
todo_wine
ok
(
lcid
==
ptr
->
lcid
,
"%s: got wrong lcid 0x%04x, expected 0x%04x
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
lcid
,
ptr
->
lcid
);
else
todo_wine_if
(
ptr
->
todo
)
ok
(
lcid
==
ptr
->
lcid
,
"%s: got wrong lcid 0x%04x, expected 0x%04x
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
lcid
,
ptr
->
lcid
);
...
...
@@ -3934,16 +3912,10 @@ static void test_IdnToNameprepUnicode(void)
test_data
[
i
].
in_len
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
));
err
=
GetLastError
();
if
(
!
test_data
[
i
].
todo
)
{
todo_wine_if
(
test_data
[
i
].
todo
)
ok
(
ret
==
test_data
[
i
].
ret
||
broken
(
ret
==
test_data
[
i
].
broken_ret
),
"%d) ret = %d
\n
"
,
i
,
ret
);
}
else
{
todo_wine
ok
(
ret
==
test_data
[
i
].
ret
||
broken
(
ret
==
test_data
[
i
].
broken_ret
),
"%d) ret = %d
\n
"
,
i
,
ret
);
}
if
(
ret
!=
test_data
[
i
].
ret
)
continue
;
...
...
@@ -4165,10 +4137,7 @@ static void test_GetLocaleInfoEx(void)
{
val
=
0
;
pGetLocaleInfoEx
(
ptr
->
name
,
LOCALE_ILANGUAGE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
val
,
sizeof
(
val
)
/
sizeof
(
WCHAR
));
if
(
ptr
->
todo
)
todo_wine
ok
(
val
==
ptr
->
lcid
,
"%s: got wrong lcid 0x%04x, expected 0x%04x
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
val
,
ptr
->
lcid
);
else
todo_wine_if
(
ptr
->
todo
)
ok
(
val
==
ptr
->
lcid
,
"%s: got wrong lcid 0x%04x, expected 0x%04x
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
val
,
ptr
->
lcid
);
bufferW
[
0
]
=
0
;
ret
=
pGetLocaleInfoEx
(
ptr
->
name
,
LOCALE_SNAME
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
WCHAR
));
...
...
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