| 1156 | } |
| 1157 | |
| 1158 | func formatListDiff(listA, listB interface{}, extraA, extraB []interface{}) string { |
| 1159 | var msg bytes.Buffer |
| 1160 | |
| 1161 | msg.WriteString("elements differ") |
| 1162 | if len(extraA) > 0 { |
| 1163 | msg.WriteString("\n\nextra elements in list A:\n") |
| 1164 | msg.WriteString(spewConfig.Sdump(extraA)) |
| 1165 | } |
| 1166 | if len(extraB) > 0 { |
| 1167 | msg.WriteString("\n\nextra elements in list B:\n") |
| 1168 | msg.WriteString(spewConfig.Sdump(extraB)) |
| 1169 | } |
| 1170 | msg.WriteString("\n\nlistA:\n") |
| 1171 | msg.WriteString(spewConfig.Sdump(listA)) |
| 1172 | msg.WriteString("\n\nlistB:\n") |
| 1173 | msg.WriteString(spewConfig.Sdump(listB)) |
| 1174 | |
| 1175 | return msg.String() |
| 1176 | } |
| 1177 | |
| 1178 | // NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified |
| 1179 | // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, |