mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 15:17:31 -04:00
windows: correct types and error values of internal GUID handling
This corrects the Windows int type to be the more correct int32 Go analog, as well as not using GetLastError() for the error value of the GUID string parsing function. Change-Id: I9716f991ef649f7d299295e3f4e75d3986ec3a74 Reviewed-on: https://go-review.googlesource.com/c/sys/+/181397 Run-TryBot: Jason Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
committed by
Jason Donenfeld
parent
5b15430b70
commit
6df407bc07
@@ -191,4 +191,8 @@ func TestGUID(t *testing.T) {
|
||||
if guid2 != guid {
|
||||
t.Fatalf("Did not parse string back to original GUID = %q; want %q", guid2, guid)
|
||||
}
|
||||
_, err = windows.GUIDFromString("not-a-real-guid")
|
||||
if err != syscall.Errno(windows.CO_E_CLASSSTRING) {
|
||||
t.Fatalf("Bad GUID string error = %v; want CO_E_CLASSSTRING", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user