16 lines
326 B
Go
16 lines
326 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestCrockfordEncode(t *testing.T) {
|
|
input := []byte{1, 141, 178, 57, 150, 88, 1, 148, 253, 194, 250, 47, 252, 192, 65, 211}
|
|
|
|
expected := "01HPS3K5JR06AFVGQT5ZYC0GEK"
|
|
output := CrockfordEncode(input)
|
|
if expected != output {
|
|
t.Errorf("expected %v, got %v", expected, output)
|
|
}
|
|
}
|