19 lines
436 B
Go
19 lines
436 B
Go
package data_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.anygate.cloud/anygatecloud/strom/mc/data"
|
|
)
|
|
|
|
func TestLookUpProtocolVersion(t *testing.T) {
|
|
version, err := data.LookUpVersionByProtocolVersion(772)
|
|
if err != nil {
|
|
t.Fatalf("Expected to find version 772, got error: %v", err)
|
|
}
|
|
if version.MinecraftVersion != "1.21.8" {
|
|
t.Errorf("Expected version 1.21.8, got %s", version.MinecraftVersion)
|
|
}
|
|
t.Logf("Found version %v", version)
|
|
}
|