windows: copy latest changes from internal/syscall/windows

Copy of CL 4310, 6140, 17412, 17997 and 17998.

Change-Id: I7db8722a1c37f033d5ce6644859ef15c58289a46
Reviewed-on: https://go-review.googlesource.com/18552
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Alex Brainman
2016-01-13 01:14:10 +00:00
parent 833a04a105
commit 442cd60086
4 changed files with 161 additions and 7 deletions
+8 -6
View File
@@ -701,17 +701,19 @@ func TestGetMUIStringValue(t *testing.T) {
}
defer timezoneK.Close()
var tests = []struct {
key registry.Key
type testType struct {
name string
want string
}{
{timezoneK, "MUI_Std", syscall.UTF16ToString(dtzi.StandardName[:])},
{timezoneK, "MUI_Dlt", syscall.UTF16ToString(dtzi.DaylightName[:])},
}
var tests = []testType{
{"MUI_Std", syscall.UTF16ToString(dtzi.StandardName[:])},
}
if dtzi.DynamicDaylightTimeDisabled == 0 {
tests = append(tests, testType{"MUI_Dlt", syscall.UTF16ToString(dtzi.DaylightName[:])})
}
for _, test := range tests {
got, err := test.key.GetMUIStringValue(test.name)
got, err := timezoneK.GetMUIStringValue(test.name)
if err != nil {
t.Error("GetMUIStringValue:", err)
}