21 lines
257 B
Go
21 lines
257 B
Go
package crushmap
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"testing"
|
|
)
|
|
|
|
func TestBinary(t *testing.T) {
|
|
buf, err := ioutil.ReadFile("testdata/map.bin")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
m := NewMap()
|
|
err = m.DecodeBinary(buf)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
_ = m
|
|
}
|