mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-12-23 16:50:18 +01:00
Made test less spammy.
This commit is contained in:
parent
b257a60b2d
commit
ed41cfbe01
@ -41,14 +41,22 @@ 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] {
|
||||||
|
if !already1 {
|
||||||
|
already1 = true
|
||||||
t.Errorf("Hash contains pointer to element not being in list: %d",
|
t.Errorf("Hash contains pointer to element not being in list: %d",
|
||||||
updates)
|
updates)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if k != v.btKey {
|
if k != v.btKey {
|
||||||
|
if !already2 {
|
||||||
|
already2 = true
|
||||||
t.Error("Key in entry does not match hash key: %d", updates)
|
t.Error("Key in entry does not match hash key: %d", updates)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
delete(entries, v)
|
delete(entries, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user