1
0
mirror of https://github.com/fumiama/unibase2n.git synced 2026-06-12 13:10:23 +08:00
Files
unibase2n/len_test.go
2022-10-01 08:42:22 +08:00

16 lines
279 B
Go

package unibase2n
import "testing"
func TestEnDecodeLen(t *testing.T) {
bs := Base{bit: 1}
for ; bs.bit < 16; bs.bit++ {
for i := 1; i <= 65536; i++ {
in := bs.DecodeLen(bs.EncodeLen(i))
if i != in {
t.Fatal("bit:", bs.bit, "in:", i, "!= out:", in)
}
}
}
}