Made test less spammy.

This commit is contained in:
Sascha L. Teichmann 2016-05-11 11:43:38 +02:00
parent b257a60b2d
commit ed41cfbe01

View File

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