From 05d25fd1b71aaad8f542999851d472d63b724ae2 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 7 Feb 2019 22:23:03 +0100 Subject: setupapi: Merge _SP_DEVINFO_LIST_DETAIL_DATA and DevInfoListDetailData Signed-off-by: Simon Rozman --- tun/wintun/setupapi/setupapi_windows_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tun/wintun/setupapi/setupapi_windows_test.go') 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) { -- cgit v1.2.3