Skip to content

Commit cb4e70c

Browse files
committed
review: match fail msg with params
1 parent 7af3ed3 commit cb4e70c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

assert/assertions.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -1191,19 +1191,19 @@ func NotElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interf
11911191
h.Helper()
11921192
}
11931193
if isEmpty(listA) && isEmpty(listB) {
1194-
return Fail(t, "A and B are the same", msgAndArgs)
1194+
return Fail(t, "listA and listB contain the same elements", msgAndArgs)
11951195
}
11961196

11971197
if !isList(t, listA, msgAndArgs...) {
1198-
return Fail(t, "A is not a list", msgAndArgs...)
1198+
return Fail(t, "listA is not a list type", msgAndArgs...)
11991199
}
12001200
if !isList(t, listB, msgAndArgs...) {
1201-
return Fail(t, "B is not a list", msgAndArgs...)
1201+
return Fail(t, "listB is not a list type", msgAndArgs...)
12021202
}
12031203

12041204
extraA, extraB := diffLists(listA, listB)
12051205
if len(extraA) == 0 && len(extraB) == 0 {
1206-
return Fail(t, "A and B are the same", msgAndArgs)
1206+
return Fail(t, "listA and listB contain the same elements", msgAndArgs)
12071207
}
12081208

12091209
return true

0 commit comments

Comments
 (0)