Commit cfde18c4 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

setupapi/tests: Change return values from coinst functions.

As co_error and class_error both return 0xdeadbeef, use of 0xdeadbeef as a canary value as well can lead to ambiguous tests results. Signed-off-by: 's avatarJeff Smith <whydoubt@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 88730d22
......@@ -47,7 +47,7 @@ DWORD WINAPI class_default(DI_FUNCTION function, HDEVINFO set, SP_DEVINFO_DATA *
DWORD WINAPI class_error(DI_FUNCTION function, HDEVINFO set, SP_DEVINFO_DATA *device)
{
return 0xdeadbeef;
return 0xdeadc0de;
}
DWORD WINAPI co_success(DI_FUNCTION function, HDEVINFO set, SP_DEVINFO_DATA *device,
......@@ -67,5 +67,5 @@ DWORD WINAPI CoDeviceInstall(DI_FUNCTION function, HDEVINFO set, SP_DEVINFO_DATA
DWORD WINAPI co_error(DI_FUNCTION function, HDEVINFO set, SP_DEVINFO_DATA *device,
COINSTALLER_CONTEXT_DATA *context)
{
return 0xdeadbeef;
return 0xdeadc0de;
}
......@@ -2727,17 +2727,17 @@ static void test_class_installer(void)
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device);
ok(!ret, "Expected failure.\n");
ok(GetLastError() == 0xdeadbeef, "Got unexpected error %#x.\n", GetLastError());
ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device);
ok(!ret, "Expected failure.\n");
ok(GetLastError() == 0xdeadbeef, "Got unexpected error %#x.\n", GetLastError());
ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
ret = SetupDiCallClassInstaller(DIF_REMOVE, set, &device);
ok(!ret, "Expected failure.\n");
ok(GetLastError() == 0xdeadbeef, "Got unexpected error %#x.\n", GetLastError());
ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
SetupDiDestroyDeviceInfoList(set);
......@@ -2875,12 +2875,12 @@ static void test_class_coinstaller(void)
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device);
ok(!ret, "Expected failure.\n");
ok(GetLastError() == 0xdeadbeef, "Got unexpected error %#x.\n", GetLastError());
ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device);
ok(!ret, "Expected failure.\n");
ok(GetLastError() == 0xdeadbeef, "Got unexpected error %#x.\n", GetLastError());
ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
SetupDiDestroyDeviceInfoList(set);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment