Nikolay Sivov : propsys/tests: Add a VT_UI4 test for PropVariantCompareEx().

Alexandre Julliard julliard at winehq.org
Tue Nov 9 15:55:05 CST 2021


Module: wine
Branch: master
Commit: 10359e17ce64f39461a7b7b54f73857e6458d1fb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=10359e17ce64f39461a7b7b54f73857e6458d1fb

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Nov  9 10:05:47 2021 +0300

propsys/tests: Add a VT_UI4 test for PropVariantCompareEx().

A test for 58eeb1a86433db1104d3a9ccf9ad7435ec81443a.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/propsys/tests/propsys.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c
index 9ffa048a8b7..6370c01dc80 100644
--- a/dlls/propsys/tests/propsys.c
+++ b/dlls/propsys/tests/propsys.c
@@ -670,6 +670,7 @@ static void test_PropVariantCompareEx(void)
 {
     PROPVARIANT empty, null, emptyarray, i2_0, i2_2, i4_large, i4_largeneg, i4_2, str_2, str_02, str_b;
     PROPVARIANT clsid_null, clsid, clsid2, r4_0, r4_2, r8_0, r8_2;
+    PROPVARIANT ui4, ui4_large;
     PROPVARIANT var1, var2;
     INT res;
     static const WCHAR str_2W[] = {'2', 0};
@@ -711,6 +712,10 @@ static void test_PropVariantCompareEx(void)
     i4_largeneg.lVal = -65536;
     i4_2.vt = VT_I4;
     i4_2.lVal = 2;
+    ui4.vt = VT_UI4;
+    ui4.ulVal = 2;
+    ui4_large.vt = VT_UI4;
+    ui4_large.ulVal = 65536;
     str_2.vt = VT_BSTR;
     str_2.bstrVal = SysAllocString(str_2W);
     str_02.vt = VT_BSTR;
@@ -759,6 +764,12 @@ static void test_PropVariantCompareEx(void)
     res = PropVariantCompareEx(&i2_0, &i2_2, 0, 0);
     ok(res == -1, "res=%i\n", res);
 
+    res = PropVariantCompareEx(&ui4, &ui4_large, 0, 0);
+    ok(res == -1, "res=%i\n", res);
+
+    res = PropVariantCompareEx(&ui4_large, &ui4, 0, 0);
+    ok(res == 1, "res=%i\n", res);
+
     /* Always return -1 if second value cannot be converted to first type */
     res = PropVariantCompareEx(&i2_0, &i4_large, 0, 0);
     ok(res == -1, "res=%i\n", res);




More information about the wine-cvs mailing list