mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 01:27:38 +00:00
231e468e19
git-subtree-dir: erigon-lib git-subtree-mainline:3c8cbda809
git-subtree-split:93d9c9d9fe
18 lines
298 B
Go
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)
|
|
}
|