setupapi/tests: Avoid sizeof in traces.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-02-06 20:26:25 +01:00
parent 651c446217
commit d70d6b8486
1 changed files with 5 additions and 5 deletions

View File

@ -568,7 +568,7 @@ static void test_device_property(void)
ok(!ret, "Expect failure\n"); ok(!ret, "Expect failure\n");
ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err); ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err);
ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type);
ok(size == sizeof(valueW), "Expect size %d, got %d\n", sizeof(valueW), size); ok(size == sizeof(valueW), "Got size %d\n", size);
/* #7 Zero buffer size */ /* #7 Zero buffer size */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
@ -579,7 +579,7 @@ static void test_device_property(void)
ok(!ret, "Expect failure\n"); ok(!ret, "Expect failure\n");
ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err); ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err);
ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type);
ok(size == sizeof(valueW), "Expect size %d, got %d\n", sizeof(valueW), size); ok(size == sizeof(valueW), "Got size %d\n", size);
/* #8 Null required size */ /* #8 Null required size */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
@ -621,7 +621,7 @@ static void test_device_property(void)
ok(ret, "Expect success\n"); ok(ret, "Expect success\n");
ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err);
ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type);
ok(size == sizeof(valueW), "Expect size %d, got %d\n", sizeof(valueW), size); ok(size == sizeof(valueW), "Got size %d\n", size);
ok(!lstrcmpW((WCHAR *)buffer, valueW), "Expect buffer %s, got %s\n", wine_dbgstr_w(valueW), wine_dbgstr_w((WCHAR *)buffer)); ok(!lstrcmpW((WCHAR *)buffer, valueW), "Expect buffer %s, got %s\n", wine_dbgstr_w(valueW), wine_dbgstr_w((WCHAR *)buffer));
/* #12 Get null property value */ /* #12 Get null property value */
@ -649,7 +649,7 @@ static void test_device_property(void)
ok(!ret, "Expect failure\n"); ok(!ret, "Expect failure\n");
ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err); ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err);
ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type);
ok(size == sizeof(valueW), "Expect size %d, got %d\n", sizeof(valueW), size); ok(size == sizeof(valueW), "Got size %d\n", size);
/* #14 Normal */ /* #14 Normal */
ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0);
@ -663,7 +663,7 @@ static void test_device_property(void)
ok(ret, "Expect success\n"); ok(ret, "Expect success\n");
ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err);
ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type);
ok(size == sizeof(valueW), "Expect size %d, got %d\n", sizeof(valueW), size); ok(size == sizeof(valueW), "Got size %d\n", size);
ok(!lstrcmpW((WCHAR *)buffer, valueW), "Expect buffer %s, got %s\n", wine_dbgstr_w(valueW), wine_dbgstr_w((WCHAR *)buffer)); ok(!lstrcmpW((WCHAR *)buffer, valueW), "Expect buffer %s, got %s\n", wine_dbgstr_w(valueW), wine_dbgstr_w((WCHAR *)buffer));
ret = SetupDiRemoveDevice(set, &device_data); ret = SetupDiRemoveDevice(set, &device_data);