summaryrefslogtreecommitdiffhomepage
path: root/tun/wintun/setupapi/setupapi_windows_test.go
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-02-07 22:23:03 +0100
committerSimon Rozman <simon@rozman.si>2019-02-07 23:49:50 +0100
commit05d25fd1b71aaad8f542999851d472d63b724ae2 (patch)
tree4d9d20b7e5ed80a154d8c522b4338e267c58de84 /tun/wintun/setupapi/setupapi_windows_test.go
parent6d2729dcccc7d02a2578ee28580b351769868b03 (diff)
setupapi: Merge _SP_DEVINFO_LIST_DETAIL_DATA and DevInfoListDetailData
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun/wintun/setupapi/setupapi_windows_test.go')
-rw-r--r--tun/wintun/setupapi/setupapi_windows_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/tun/wintun/setupapi/setupapi_windows_test.go b/tun/wintun/setupapi/setupapi_windows_test.go
index 16d2603..b8f4bc7 100644
--- a/tun/wintun/setupapi/setupapi_windows_test.go
+++ b/tun/wintun/setupapi/setupapi_windows_test.go
@@ -63,7 +63,7 @@ func TestSetupDiGetDeviceInfoListDetail(t *testing.T) {
t.Error("SetupDiGetDeviceInfoListDetail returned non-NULL remote machine handle")
}
- if data.RemoteMachineName != "" {
+ if data.GetRemoteMachineName() != "" {
t.Error("SetupDiGetDeviceInfoListDetail returned non-NULL remote machine name")
}
}
@@ -86,10 +86,16 @@ func TestSetupDiGetDeviceInfoListDetail(t *testing.T) {
t.Error("SetupDiGetDeviceInfoListDetail returned NULL remote machine handle")
}
- if data.RemoteMachineName != computerName {
+ if data.GetRemoteMachineName() != computerName {
t.Error("SetupDiGetDeviceInfoListDetail returned different remote machine name")
}
}
+
+ data = &DevInfoListDetailData{}
+ data.SetRemoteMachineName("foobar")
+ if data.GetRemoteMachineName() != "foobar" {
+ t.Error("DevInfoListDetailData.(Get|Set)RemoteMachineName() differ")
+ }
}
func TestSetupDiCreateDeviceInfo(t *testing.T) {