mirror of
https://git.zx2c4.com/wireguard-go
synced 2024-11-15 01:05:15 +01:00
d41bc015cc
Signed-off-by: Simon Rozman <simon@rozman.si>
21 lines
483 B
Go
21 lines
483 B
Go
/* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright (C) 2019 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 != 6 /*ERROR_INVALID_HANDLE*/ {
|
|
t.Errorf("SetupDiDestroyDeviceInfoList(nil, ...) should fail with ERROR_INVALID_HANDLE")
|
|
}
|
|
}
|