pot: Correct to reverse test results

This commit is contained in:
lash 2018-01-16 14:28:02 +01:00
parent 01931c4e8d
commit 079be17d1f

View file

@ -271,7 +271,7 @@ func testPotEachNeighbour(n *Pot, pof Pof, val Val, expCount int, fs ...func(Val
} }
} }
count++ count++
return count == expCount return count != expCount
}) })
if err == nil && count < expCount { if err == nil && count < expCount {
return fmt.Errorf("not enough neighbours returned, expected %v, got %v", expCount, count) return fmt.Errorf("not enough neighbours returned, expected %v, got %v", expCount, count)
@ -555,7 +555,7 @@ func benchmarkEachNeighbourSync(t *testing.B, max, count int, d time.Duration) {
n.EachNeighbour(val, pof, func(v Val, po int) bool { n.EachNeighbour(val, pof, func(v Val, po int) bool {
time.Sleep(d) time.Sleep(d)
m++ m++
return m == count return m != count
}) })
} }
t.StopTimer() t.StopTimer()