diff options
Diffstat (limited to 'setupapi/setupapi_windows_test.go')
-rw-r--r-- | setupapi/setupapi_windows_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/setupapi/setupapi_windows_test.go b/setupapi/setupapi_windows_test.go index 17d6d8e..c99da6f 100644 --- a/setupapi/setupapi_windows_test.go +++ b/setupapi/setupapi_windows_test.go @@ -70,6 +70,29 @@ func TestSetupDiClassGuidsFromNameEx(t *testing.T) { } } +func TestSetupDiCreateDeviceInfoListEx(t *testing.T) { + devInfoList, err := SetupDiCreateDeviceInfoListEx(&deviceClassNetGUID, 0, "") + if err == nil { + devInfoList.Close() + } else { + t.Errorf("Error calling SetupDiCreateDeviceInfoListEx: %s", err.Error()) + } + + devInfoList, err = SetupDiCreateDeviceInfoListEx(&deviceClassNetGUID, 0, computerName) + if err == nil { + devInfoList.Close() + } else { + t.Errorf("Error calling SetupDiCreateDeviceInfoListEx: %s", err.Error()) + } + + devInfoList, err = SetupDiCreateDeviceInfoListEx(nil, 0, "") + if err == nil { + devInfoList.Close() + } else { + t.Errorf("Error calling SetupDiCreateDeviceInfoListEx(nil): %s", err.Error()) + } +} + func TestSetupDiGetClassDevsEx(t *testing.T) { devInfoList, err := SetupDiGetClassDevsEx(&deviceClassNetGUID, "PCI", 0, DIGCF_PRESENT, DevInfo(0), computerName) if err == nil { |