mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +00:00
[SETUPAPI_WINETEST] Sync with Wine Staging 1.9.18.
svn path=/trunk/; revision=72614
This commit is contained in:
parent
4ec63eee1b
commit
450fb4a3d3
2 changed files with 15 additions and 1 deletions
|
@ -833,6 +833,7 @@ static void testGetDeviceInterfaceDetail(void)
|
||||||
"\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}";
|
"\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}";
|
||||||
static const char path_w2k[] =
|
static const char path_w2k[] =
|
||||||
"\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\\";
|
"\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\\";
|
||||||
|
SP_DEVINFO_DATA devinfo;
|
||||||
LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size);
|
LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size);
|
||||||
SP_DEVICE_INTERFACE_DETAIL_DATA_A *detail =
|
SP_DEVICE_INTERFACE_DETAIL_DATA_A *detail =
|
||||||
(SP_DEVICE_INTERFACE_DETAIL_DATA_A *)buf;
|
(SP_DEVICE_INTERFACE_DETAIL_DATA_A *)buf;
|
||||||
|
@ -860,9 +861,12 @@ static void testGetDeviceInterfaceDetail(void)
|
||||||
!lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
|
!lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
|
||||||
detail->DevicePath);
|
detail->DevicePath);
|
||||||
/* Check SetupDiGetDeviceInterfaceDetailW */
|
/* Check SetupDiGetDeviceInterfaceDetailW */
|
||||||
ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL);
|
memset(&devinfo, 0, sizeof(devinfo));
|
||||||
|
devinfo.cbSize = sizeof(devinfo);
|
||||||
|
ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, &devinfo);
|
||||||
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
|
||||||
"Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError());
|
"Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError());
|
||||||
|
ok(devinfo.DevInst, "Expected DevInst to be set\n");
|
||||||
ok(expectedsize == size ||
|
ok(expectedsize == size ||
|
||||||
(expectedsize + sizeof(WCHAR)) == size /* W2K adds a backslash */,
|
(expectedsize + sizeof(WCHAR)) == size /* W2K adds a backslash */,
|
||||||
"SetupDiGetDeviceInterfaceDetailW returned wrong reqsize, got %d\n",
|
"SetupDiGetDeviceInterfaceDetailW returned wrong reqsize, got %d\n",
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
#include "setupapi.h"
|
#include "setupapi.h"
|
||||||
|
#include "cfgmgr32.h"
|
||||||
|
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
@ -816,6 +817,14 @@ static void test_SetupLogError(void)
|
||||||
SetupCloseLog();
|
SetupCloseLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_CM_Get_Version(void)
|
||||||
|
{
|
||||||
|
WORD ret;
|
||||||
|
|
||||||
|
ret = CM_Get_Version();
|
||||||
|
ok(ret == 0x0400, "got version %#x\n", ret);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(misc)
|
START_TEST(misc)
|
||||||
{
|
{
|
||||||
HMODULE hsetupapi = GetModuleHandleA("setupapi.dll");
|
HMODULE hsetupapi = GetModuleHandleA("setupapi.dll");
|
||||||
|
@ -849,4 +858,5 @@ START_TEST(misc)
|
||||||
test_defaultcallback();
|
test_defaultcallback();
|
||||||
|
|
||||||
test_SetupLogError();
|
test_SetupLogError();
|
||||||
|
test_CM_Get_Version();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue