You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add errorsplus for composite errors
* Adjust error message
* Change error message to human friendly message
* Remove duplicated message
* Add indentation keep support, and test case for align
* Add proper error handling when markers don't match
* Adjust error message
* Add clarification comment
* Add better error handling test case
* Add test case for indent keep mode
* Add test case for broken marker
* Correct error message
t.Errorf("result didn't match (-want / +got)\n%s", diff)
84
+
}
85
+
})
86
+
}
87
+
}
88
+
89
+
funcTestCompositeErrorsMismatch(t*testing.T) {
90
+
cases:=map[string]struct {
91
+
errs errorsplus.Errors
92
+
mismatchedErrerror
93
+
}{
94
+
"zero error": {
95
+
errs: errorsplus.Errors{
96
+
// empty
97
+
},
98
+
mismatchedErr: errOther,
99
+
},
100
+
"single error": {
101
+
errs: errorsplus.Errors{
102
+
errFirst,
103
+
},
104
+
mismatchedErr: errOther,
105
+
},
106
+
"2 errors": {
107
+
errs: errorsplus.Errors{
108
+
errFirst,
109
+
errSecond,
110
+
},
111
+
mismatchedErr: errOther,
112
+
},
113
+
}
114
+
115
+
forname, tc:=rangecases {
116
+
t.Run(name, func(t*testing.T) {
117
+
iferrors.Is(tc.errs, tc.mismatchedErr) {
118
+
t.Errorf("unexpected error match, where it should not be matched with errors.Is\n\tcomposite error: %v\n\ttarget error: %v", tc.errs, tc.mismatchedErr)
0 commit comments