wintun: Introduce new package for obscuring Windows bits

This commit is contained in:
Jason A. Donenfeld
2019-02-07 04:18:27 +01:00
parent 306d08e692
commit ea59177f1c
12 changed files with 527 additions and 487 deletions

View File

@@ -0,0 +1,20 @@
/* 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")
}
}