mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-20 09:21:11 +00:00
231e468e19
git-subtree-dir: erigon-lib git-subtree-mainline: 3c8cbda8098cc073a668b9e9b0aafe6c361f17da git-subtree-split: 93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3
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)
|
|
}
|