mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
23 lines
384 B
Go
23 lines
384 B
Go
package twitter
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestIndices(t *testing.T) {
|
|
cases := []struct {
|
|
pair Indices
|
|
expectedStart int
|
|
expectedEnd int
|
|
}{
|
|
{Indices{}, 0, 0},
|
|
{Indices{25, 47}, 25, 47},
|
|
}
|
|
for _, c := range cases {
|
|
assert.Equal(t, c.expectedStart, c.pair.Start())
|
|
assert.Equal(t, c.expectedEnd, c.pair.End())
|
|
}
|
|
}
|