review: match fail msg with params

pull/1600/head
hendry.wiranto 2024-05-28 21:35:41 +07:00
parent 7af3ed34c2
commit cb4e70cf8d
1 changed files with 4 additions and 4 deletions

View File

@ -1191,19 +1191,19 @@ func NotElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interf
h.Helper()
}
if isEmpty(listA) && isEmpty(listB) {
return Fail(t, "A and B are the same", msgAndArgs)
return Fail(t, "listA and listB contain the same elements", msgAndArgs)
}
if !isList(t, listA, msgAndArgs...) {
return Fail(t, "A is not a list", msgAndArgs...)
return Fail(t, "listA is not a list type", msgAndArgs...)
}
if !isList(t, listB, msgAndArgs...) {
return Fail(t, "B is not a list", msgAndArgs...)
return Fail(t, "listB is not a list type", msgAndArgs...)
}
extraA, extraB := diffLists(listA, listB)
if len(extraA) == 0 && len(extraB) == 0 {
return Fail(t, "A and B are the same", msgAndArgs)
return Fail(t, "listA and listB contain the same elements", msgAndArgs)
}
return true