mirror of
https://github.com/reactos/reactos.git
synced 2024-07-08 21:55:08 +00:00
[WINESYNC] setupapi/tests: Test phantom value after device creation.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 35673c7e8e0709276fe6f0bb2727da3da438ec11 by Zhiyi Zhang <zzhang@codeweavers.com>
This commit is contained in:
parent
9c3ba23c74
commit
2f25688991
|
@ -746,6 +746,11 @@ static void test_register_device_info(void)
|
||||||
SP_DEVINFO_DATA device = {0};
|
SP_DEVINFO_DATA device = {0};
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
HDEVINFO set;
|
HDEVINFO set;
|
||||||
|
HKEY hkey;
|
||||||
|
LSTATUS ls;
|
||||||
|
DWORD type = 0;
|
||||||
|
DWORD phantom = 0;
|
||||||
|
DWORD size;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
|
@ -774,8 +779,19 @@ static void test_register_device_info(void)
|
||||||
|
|
||||||
ret = SetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0000", &guid, NULL, NULL, 0, &device);
|
ret = SetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0000", &guid, NULL, NULL, 0, &device);
|
||||||
ok(ret, "Failed to create device, error %#x.\n", GetLastError());
|
ok(ret, "Failed to create device, error %#x.\n", GetLastError());
|
||||||
|
RegOpenKeyA(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Enum\\ROOT\\LEGACY_BOGUS\\0000", &hkey);
|
||||||
|
size = sizeof(phantom);
|
||||||
|
ls = RegQueryValueExA(hkey, "Phantom", NULL, &type, (BYTE *)&phantom, &size);
|
||||||
|
todo_wine ok(ls == ERROR_SUCCESS, "Got wrong error code %#x\n", ls);
|
||||||
|
todo_wine ok(phantom == 1, "Got wrong phantom value %d\n", phantom);
|
||||||
|
todo_wine ok(type == REG_DWORD, "Got wrong phantom type %#x\n", type);
|
||||||
|
ok(size == sizeof(phantom), "Got wrong phantom size %d\n", size);
|
||||||
ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL);
|
ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL);
|
||||||
ok(ret, "Failed to register device, error %#x.\n", GetLastError());
|
ok(ret, "Failed to register device, error %#x.\n", GetLastError());
|
||||||
|
size = sizeof(phantom);
|
||||||
|
ls = RegQueryValueExA(hkey, "Phantom", NULL, NULL, (BYTE *)&phantom, &size);
|
||||||
|
ok(ls == ERROR_FILE_NOT_FOUND, "Got wrong error code %#x\n", ls);
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
ret = SetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0001", &guid, NULL, NULL, 0, &device);
|
ret = SetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0001", &guid, NULL, NULL, 0, &device);
|
||||||
ok(ret, "Failed to create device, error %#x.\n", GetLastError());
|
ok(ret, "Failed to create device, error %#x.\n", GetLastError());
|
||||||
|
|
|
@ -8,4 +8,4 @@ files:
|
||||||
dlls/setupapi/setupcab.c: dll/win32/setupapi/setupcab.c
|
dlls/setupapi/setupcab.c: dll/win32/setupapi/setupcab.c
|
||||||
dlls/setupapi/stringtable.c: dll/win32/setupapi/stringtable_wine.c
|
dlls/setupapi/stringtable.c: dll/win32/setupapi/stringtable_wine.c
|
||||||
tags:
|
tags:
|
||||||
wine: 9f2baf1dd49590a0f8dada5a050719b7e2be697c
|
wine: 35673c7e8e0709276fe6f0bb2727da3da438ec11
|
||||||
|
|
Loading…
Reference in a new issue