erigon-pulse/erigon-lib/sais/sais_test.go
battlmonstr 231e468e19 Add 'erigon-lib/' from commit '93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3'
git-subtree-dir: erigon-lib
git-subtree-mainline: 3c8cbda809
git-subtree-split: 93d9c9d9fe
2023-09-20 14:50:25 +02:00

18 lines
298 B
Go

package sais
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSais(t *testing.T) {
data := []byte{4, 5, 6, 4, 5, 6, 4, 5, 6}
sa := make([]int32, len(data))
err := Sais(data, sa)
if err != nil {
t.Fatal(err)
}
assert.Equal(t, []int32{6, 3, 0, 7, 4, 1, 8, 5, 2}, sa)
}