Nikolay Sivov : oleaut32/tests: Add a test for VT_NULL input for VarFormatDateTime().
Module: wine Branch: master Commit: 41f456f3a48896a10392836a76008f916563c32d URL: https://gitlab.winehq.org/wine/wine/-/commit/41f456f3a48896a10392836a76008f9... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 16 17:25:17 2022 +0300 oleaut32/tests: Add a test for VT_NULL input for VarFormatDateTime(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/oleaut32/tests/varformat.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index 16506d8e97f..bc3b6c175f9 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -659,6 +659,19 @@ static void test_VarFormatCurrency(void) VariantClear(&in); } +static void test_VarFormatDateTime(void) +{ + VARIANT in; + HRESULT hr; + BSTR str; + + V_VT(&in) = VT_NULL; + str = (void *)0xdeadbeef; + hr = VarFormatDateTime(&in, 0, 0, &str); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!str, "Unexpected out string %p.\n", str); +} + START_TEST(varformat) { test_VarFormatNumber(); @@ -667,4 +680,5 @@ START_TEST(varformat) test_VarFormatFromTokens(); test_GetAltMonthNames(); test_VarFormatCurrency(); + test_VarFormatDateTime(); }
participants (1)
-
Alexandre Julliard