wireguard-go/tun/wintun/setupapi/zsetupapi_windows_test.go
Jason A. Donenfeld db0aa39b76 global: update header comments and modules
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-05-02 02:08:26 -06:00

21 lines
485 B
Go

/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2020 WireGuard LLC. All Rights Reserved.
*/
package setupapi
import (
"syscall"
"testing"
"golang.org/x/sys/windows"
)
func TestSetupDiDestroyDeviceInfoList(t *testing.T) {
err := SetupDiDestroyDeviceInfoList(DevInfo(windows.InvalidHandle))
if errWin, ok := err.(syscall.Errno); !ok || errWin != windows.ERROR_INVALID_HANDLE {
t.Errorf("SetupDiDestroyDeviceInfoList(nil, ...) should fail with ERROR_INVALID_HANDLE")
}
}