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
083dea7f
Commit
083dea7f
authored
Mar 15, 2022
by
Daniel Lehman
Committed by
Alexandre Julliard
Mar 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys/tests: Add some InitVariantFromFileTime tests.
Signed-off-by:
Daniel Lehman
<
dlehman@esri.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f2b8ccb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
propsys.c
dlls/propsys/tests/propsys.c
+35
-0
No files found.
dlls/propsys/tests/propsys.c
View file @
083dea7f
...
@@ -2030,6 +2030,40 @@ static void test_PSCreatePropertyStoreFromObject(void)
...
@@ -2030,6 +2030,40 @@ static void test_PSCreatePropertyStoreFromObject(void)
IPropertyStore_Release
(
propstore
);
IPropertyStore_Release
(
propstore
);
}
}
static
void
test_InitVariantFromFileTime
(
void
)
{
FILETIME
ft
=
{
0
};
SYSTEMTIME
st
;
VARIANT
var
;
HRESULT
hr
;
double
d
;
VariantInit
(
&
var
);
if
(
0
)
/* crash on Windows */
{
InitVariantFromFileTime
(
&
ft
,
NULL
);
InitVariantFromFileTime
(
NULL
,
&
var
);
}
ft
.
dwHighDateTime
=
-
1
;
ft
.
dwLowDateTime
=
-
1
;
V_VT
(
&
var
)
=
0xdead
;
V_DATE
(
&
var
)
=
42
.
0
;
hr
=
InitVariantFromFileTime
(
&
ft
,
&
var
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
V_VT
(
&
var
)
==
VT_EMPTY
,
"Unexpected VT %d
\n
"
,
V_VT
(
&
var
));
ok
(
V_DATE
(
&
var
)
==
0
.
0
,
"got wrong value: %f, expected 0.0
\n
"
,
V_DATE
(
&
var
));
GetSystemTimeAsFileTime
(
&
ft
);
hr
=
InitVariantFromFileTime
(
&
ft
,
&
var
);
ok
(
V_VT
(
&
var
)
==
VT_DATE
,
"Unexpected VT %d
\n
"
,
V_VT
(
&
var
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
FileTimeToSystemTime
(
&
ft
,
&
st
);
SystemTimeToVariantTime
(
&
st
,
&
d
);
ok
(
V_DATE
(
&
var
)
==
d
,
"got wrong value: %f, expected %f
\n
"
,
V_DATE
(
&
var
),
d
);
}
START_TEST
(
propsys
)
START_TEST
(
propsys
)
{
{
test_PSStringFromPropertyKey
();
test_PSStringFromPropertyKey
();
...
@@ -2053,4 +2087,5 @@ START_TEST(propsys)
...
@@ -2053,4 +2087,5 @@ START_TEST(propsys)
test_PSCreateMemoryPropertyStore
();
test_PSCreateMemoryPropertyStore
();
test_propertystore
();
test_propertystore
();
test_PSCreatePropertyStoreFromObject
();
test_PSCreatePropertyStoreFromObject
();
test_InitVariantFromFileTime
();
}
}
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