mirror of https://github.com/stretchr/testify.git
Compress some newlines
parent
bf57a5dedc
commit
8bd27ddf8b
|
@ -760,16 +760,13 @@ func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface
|
||||||
|
|
||||||
// Mark indexes in bValue that we already used
|
// Mark indexes in bValue that we already used
|
||||||
visited := make([]bool, bValue.Len())
|
visited := make([]bool, bValue.Len())
|
||||||
|
|
||||||
for i := 0; i < aValue.Len(); i++ {
|
for i := 0; i < aValue.Len(); i++ {
|
||||||
element := aValue.Index(i).Interface()
|
element := aValue.Index(i).Interface()
|
||||||
|
|
||||||
found := false
|
found := false
|
||||||
for j := 0; j < bValue.Len(); j++ {
|
for j := 0; j < bValue.Len(); j++ {
|
||||||
if visited[j] {
|
if visited[j] {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if ObjectsAreEqual(bValue.Index(j).Interface(), element) {
|
if ObjectsAreEqual(bValue.Index(j).Interface(), element) {
|
||||||
visited[j] = true
|
visited[j] = true
|
||||||
found = true
|
found = true
|
||||||
|
|
Loading…
Reference in New Issue