[SETUPAPI_WINETEST] Sync with Wine Staging 1.9.18.

svn path=/trunk/; revision=72614
This commit is contained in:
Amine Khaldi 2016-09-07 22:43:09 +00:00
parent 4ec63eee1b
commit 450fb4a3d3
2 changed files with 15 additions and 1 deletions

View file

@ -833,6 +833,7 @@ static void testGetDeviceInterfaceDetail(void)
"\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}";
static const char path_w2k[] =
"\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\\";
SP_DEVINFO_DATA devinfo;
LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size);
SP_DEVICE_INTERFACE_DETAIL_DATA_A *detail =
(SP_DEVICE_INTERFACE_DETAIL_DATA_A *)buf;
@ -860,9 +861,12 @@ static void testGetDeviceInterfaceDetail(void)
!lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
detail->DevicePath);
/* 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,
"Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError());
ok(devinfo.DevInst, "Expected DevInst to be set\n");
ok(expectedsize == size ||
(expectedsize + sizeof(WCHAR)) == size /* W2K adds a backslash */,
"SetupDiGetDeviceInterfaceDetailW returned wrong reqsize, got %d\n",

View file

@ -29,6 +29,7 @@
#include "winuser.h"
#include "winreg.h"
#include "setupapi.h"
#include "cfgmgr32.h"
#include "wine/test.h"
@ -816,6 +817,14 @@ static void test_SetupLogError(void)
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)
{
HMODULE hsetupapi = GetModuleHandleA("setupapi.dll");
@ -849,4 +858,5 @@ START_TEST(misc)
test_defaultcallback();
test_SetupLogError();
test_CM_Get_Version();
}