mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-11 04:30:22 +01:00
28 lines
509 B
Go
28 lines
509 B
Go
// Copyright 2016 by Sascha L. Teichmann
|
|
// Use of this source code is governed by the MIT license
|
|
// that can be found in the LICENSE file.
|
|
|
|
package common
|
|
|
|
import "testing"
|
|
|
|
func TestBaseTileHash(t *testing.T) {
|
|
bth := NewBaseTileHash()
|
|
h1 := []byte{1}
|
|
h2 := []byte{2}
|
|
for i := 0; i < 600; i++ {
|
|
x := i % 200
|
|
for j := 0; j < 600; j++ {
|
|
y := j % 200
|
|
var h []byte
|
|
if j%2 == 0 {
|
|
h = h1
|
|
} else {
|
|
h = h2
|
|
}
|
|
_ = bth.Update(x, y, h)
|
|
}
|
|
}
|
|
t.Logf("size: %d\n", len(bth.hashes))
|
|
}
|