Michael Stefaniuc : slc/tests: Use wide-char string literals.

Alexandre Julliard julliard at winehq.org
Mon Oct 5 15:54:57 CDT 2020


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Sat Oct  3 20:28:25 2020 +0200

slc/tests: Use wide-char string literals.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/slc/tests/slc.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/dlls/slc/tests/slc.c b/dlls/slc/tests/slc.c
index b9296b2da1..fc0b1c84ad 100644
--- a/dlls/slc/tests/slc.c
+++ b/dlls/slc/tests/slc.c
@@ -29,40 +29,33 @@
 
 static void test_SLGetWindowsInformationDWORD(void)
 {
-    static const WCHAR NonexistentLicenseValueW[] = {'N','o','n','e','x','i','s','t','e','n','t','-',
-                                                     'L','i','c','e','n','s','e','-','V','a','l','u','e',0};
-    static const WCHAR KernelMUILanguageAllowedW[] = {'K','e','r','n','e','l','-','M','U','I','-',
-                                                      'L','a','n','g','u','a','g','e','-','A','l','l','o','w','e','d',0};
-    static const WCHAR KernelMUINumberAllowedW[] = {'K','e','r','n','e','l','-','M','U','I','-',
-                                                    'N','u','m','b','e','r','-','A','l','l','o','w','e','d',0};
-    static const WCHAR emptyW[] = {0};
     DWORD value;
     HRESULT res;
 
-    res = SLGetWindowsInformationDWORD(NonexistentLicenseValueW, NULL);
+    res = SLGetWindowsInformationDWORD(L"Nonexistent-License-Value", NULL);
     ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", res);
 
     res = SLGetWindowsInformationDWORD(NULL, &value);
     ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", res);
 
     value = 0xdeadbeef;
-    res = SLGetWindowsInformationDWORD(NonexistentLicenseValueW, &value);
+    res = SLGetWindowsInformationDWORD(L"Nonexistent-License-Value", &value);
     ok(res == SL_E_VALUE_NOT_FOUND, "expected SL_E_VALUE_NOT_FOUND, got %08x\n", res);
     ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value);
 
     value = 0xdeadbeef;
-    res = SLGetWindowsInformationDWORD(emptyW, &value);
+    res = SLGetWindowsInformationDWORD(L"", &value);
     ok(res == SL_E_RIGHT_NOT_GRANTED || broken(res == 0xd000000d) /* Win 8 */,
        "expected SL_E_RIGHT_NOT_GRANTED, got %08x\n", res);
     ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value);
 
     value = 0xdeadbeef;
-    res = SLGetWindowsInformationDWORD(KernelMUILanguageAllowedW, &value);
+    res = SLGetWindowsInformationDWORD(L"Kernel-MUI-Language-Allowed", &value);
     ok(res == SL_E_DATATYPE_MISMATCHED, "expected SL_E_DATATYPE_MISMATCHED, got %08x\n", res);
     ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value);
 
     value = 0xdeadbeef;
-    res = SLGetWindowsInformationDWORD(KernelMUINumberAllowedW, &value);
+    res = SLGetWindowsInformationDWORD(L"Kernel-MUI-Number-Allowed", &value);
     ok(res == S_OK, "expected S_OK, got %u\n", res);
     ok(value != 0xdeadbeef, "expected value != 0xdeadbeef\n");
 }




More information about the wine-cvs mailing list