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
3454e94d
Commit
3454e94d
authored
Oct 16, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Oct 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Use helper function and broken() macro to make expected chain status…
crypt32: Use helper function and broken() macro to make expected chain status results a little more clear.
parent
439f5e0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
35 deletions
+35
-35
chain.c
dlls/crypt32/tests/chain.c
+35
-35
No files found.
dlls/crypt32/tests/chain.c
View file @
3454e94d
...
...
@@ -1163,6 +1163,38 @@ typedef struct _SimpleChainStatusCheck
const
CERT_TRUST_STATUS
*
rgElementStatus
;
}
SimpleChainStatusCheck
;
static
void
checkElementStatus
(
const
CERT_TRUST_STATUS
*
expected
,
const
CERT_TRUST_STATUS
*
got
,
const
CERT_TRUST_STATUS
*
ignore
,
DWORD
todo
,
DWORD
testIndex
,
DWORD
chainIndex
,
DWORD
elementIndex
)
{
if
(
todo
&
TODO_ERROR
&&
got
->
dwErrorStatus
!=
expected
->
dwErrorStatus
)
todo_wine
ok
(
got
->
dwErrorStatus
==
expected
->
dwErrorStatus
,
"Chain %d, element [%d,%d]: expected error %08x, got %08x
\n
"
,
testIndex
,
chainIndex
,
elementIndex
,
expected
->
dwErrorStatus
,
got
->
dwErrorStatus
);
else
ok
(
got
->
dwErrorStatus
==
expected
->
dwErrorStatus
||
broken
((
got
->
dwErrorStatus
&
~
ignore
->
dwErrorStatus
)
==
expected
->
dwErrorStatus
),
"Chain %d, element [%d,%d]: expected error %08x, got %08x
\n
"
,
testIndex
,
chainIndex
,
elementIndex
,
expected
->
dwErrorStatus
,
got
->
dwErrorStatus
);
if
(
todo
&
TODO_INFO
&&
got
->
dwInfoStatus
!=
expected
->
dwInfoStatus
)
todo_wine
ok
(
got
->
dwInfoStatus
==
expected
->
dwInfoStatus
,
"Chain %d, element [%d,%d]: expected info %08x, got %08x
\n
"
,
testIndex
,
chainIndex
,
elementIndex
,
expected
->
dwInfoStatus
,
got
->
dwInfoStatus
);
else
ok
(
got
->
dwInfoStatus
==
expected
->
dwInfoStatus
||
broken
((
got
->
dwInfoStatus
&
~
ignore
->
dwInfoStatus
)
==
expected
->
dwInfoStatus
),
"Chain %d, element [%d,%d]: expected info %08x, got %08x
\n
"
,
testIndex
,
chainIndex
,
elementIndex
,
expected
->
dwInfoStatus
,
got
->
dwInfoStatus
);
}
static
void
checkSimpleChainStatus
(
const
CERT_SIMPLE_CHAIN
*
simpleChain
,
const
SimpleChainStatusCheck
*
simpleChainStatus
,
const
CERT_TRUST_STATUS
*
ignore
,
DWORD
todo
,
DWORD
testIndex
,
DWORD
chainIndex
)
...
...
@@ -1180,41 +1212,9 @@ static void checkSimpleChainStatus(const CERT_SIMPLE_CHAIN *simpleChain,
DWORD
i
;
for
(
i
=
0
;
i
<
simpleChain
->
cElement
;
i
++
)
{
DWORD
error
=
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwErrorStatus
&
~
ignore
->
dwErrorStatus
;
DWORD
info
=
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
.
dwInfoStatus
&
~
ignore
->
dwInfoStatus
;
if
(
todo
&
TODO_ERROR
&&
error
!=
simpleChainStatus
->
rgElementStatus
[
i
].
dwErrorStatus
)
todo_wine
ok
(
error
==
simpleChainStatus
->
rgElementStatus
[
i
].
dwErrorStatus
,
"Chain %d, element [%d,%d]: expected error %08x, got %08x
\n
"
,
testIndex
,
chainIndex
,
i
,
simpleChainStatus
->
rgElementStatus
[
i
].
dwErrorStatus
,
error
);
else
ok
(
error
==
simpleChainStatus
->
rgElementStatus
[
i
].
dwErrorStatus
,
"Chain %d, element [%d,%d]: expected error %08x, got %08x
\n
"
,
testIndex
,
chainIndex
,
i
,
simpleChainStatus
->
rgElementStatus
[
i
].
dwErrorStatus
,
error
);
if
(
todo
&
TODO_INFO
&&
info
!=
simpleChainStatus
->
rgElementStatus
[
i
].
dwInfoStatus
)
todo_wine
ok
(
info
==
simpleChainStatus
->
rgElementStatus
[
i
].
dwInfoStatus
,
"Chain %d, element [%d,%d]: expected info %08x, got %08x
\n
"
,
testIndex
,
chainIndex
,
i
,
simpleChainStatus
->
rgElementStatus
[
i
].
dwInfoStatus
,
info
);
else
ok
(
info
==
simpleChainStatus
->
rgElementStatus
[
i
].
dwInfoStatus
,
"Chain %d, element [%d,%d]: expected info %08x, got %08x
\n
"
,
testIndex
,
chainIndex
,
i
,
simpleChainStatus
->
rgElementStatus
[
i
].
dwInfoStatus
,
info
);
}
checkElementStatus
(
&
simpleChain
->
rgpElement
[
i
]
->
TrustStatus
,
&
simpleChainStatus
->
rgElementStatus
[
i
],
ignore
,
todo
,
testIndex
,
chainIndex
,
i
);
}
}
...
...
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