package windowstray import "testing" func TestTrayReadinessAcceptsSuccessfulHRESULT_BH_WINTRAY_06(t *testing.T) { for _, tc := range []struct { name string result uintptr ready bool }{ {"S_OK", 0, true}, {"S_FALSE with registered icon", 1, true}, {"other successful HRESULT", 0x00040000, true}, {"E_FAIL", 0x80004005, false}, {"E_INVALIDARG", 0x80070057, false}, {"E_ACCESSDENIED", 0x80070005, false}, } { t.Run(tc.name, func(t *testing.T) { if got := iconQuerySucceeded(tc.result); got != tc.ready { t.Fatalf("HRESULT %#x: ready=%v, want %v", tc.result, got, tc.ready) } }) } }