Made test less spammy.

This commit is contained in:
Sascha L. Teichmann 2016-05-11 11:43:38 +02:00
parent b257a60b2d
commit ed41cfbe01
1 changed files with 11 additions and 3 deletions

View File

@ -41,13 +41,21 @@ func TestBaseTileHash(t *testing.T) {
t.Errorf("List has differnt length than hashes: %d : %d",
len(entries), len(bth.hashes))
}
var already1 bool
var already2 bool
for k, v := range bth.hashes {
if !entries[v] {
t.Errorf("Hash contains pointer to element not being in list: %d",
updates)
if !already1 {
already1 = true
t.Errorf("Hash contains pointer to element not being in list: %d",
updates)
}
}
if k != v.btKey {
t.Error("Key in entry does not match hash key: %d", updates)
if !already2 {
already2 = true
t.Error("Key in entry does not match hash key: %d", updates)
}
}
delete(entries, v)
}