aboutsummaryrefslogtreecommitdiff
path: root/tun/wintun/setupapi/setupapi_windows_test.go
diff options
context:
space:
mode:
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) {