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
6021eef5
Commit
6021eef5
authored
Oct 06, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Oct 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Print values of failing time tests.
parent
57240ddd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
encode.c
dlls/crypt32/tests/encode.c
+22
-1
No files found.
dlls/crypt32/tests/encode.c
View file @
6021eef5
...
...
@@ -462,6 +462,26 @@ static void testTimeEncoding(DWORD dwEncoding, LPCSTR structType,
"Expected CRYPT_E_BAD_ENCODE, got 0x%08x
\n
"
,
GetLastError
());
}
static
const
char
*
printSystemTime
(
const
SYSTEMTIME
*
st
)
{
static
char
buf
[
22
];
sprintf
(
buf
,
"%02d-%02d-%04d %02d:%02d:%02d.%03d"
,
st
->
wMonth
,
st
->
wDay
,
st
->
wYear
,
st
->
wHour
,
st
->
wMinute
,
st
->
wSecond
,
st
->
wMilliseconds
);
return
buf
;
}
static
const
char
*
printFileTime
(
const
FILETIME
*
ft
)
{
static
char
buf
[
22
];
SYSTEMTIME
st
;
FileTimeToSystemTime
(
ft
,
&
st
);
sprintf
(
buf
,
"%02d-%02d-%04d %02d:%02d:%02d.%03d"
,
st
.
wMonth
,
st
.
wDay
,
st
.
wYear
,
st
.
wHour
,
st
.
wMinute
,
st
.
wSecond
,
st
.
wMilliseconds
);
return
buf
;
}
static
void
testTimeDecoding
(
DWORD
dwEncoding
,
LPCSTR
structType
,
const
struct
encodedFiletime
*
time
)
{
...
...
@@ -482,7 +502,8 @@ static void testTimeDecoding(DWORD dwEncoding, LPCSTR structType,
ok
(
ret
,
"CryptDecodeObjectEx failed: %d (0x%08x)
\n
"
,
GetLastError
(),
GetLastError
());
ok
(
!
memcmp
(
&
ft1
,
&
ft2
,
sizeof
(
ft1
)),
"Got unexpected value for time decoding
\n
"
);
"Got unexpected value for time decoding:
\n
expected %s, got %s
\n
"
,
printSystemTime
(
&
time
->
sysTime
),
printFileTime
(
&
ft2
));
}
else
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_ASN1_BADTAG
,
...
...
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