elvish/pkg/eval/vals/len_test.go
Qi Xiao 6e36058d0a pkg/tt: Improve API.
- Use reflection to derive function name.

- Take test cases as variadic arguments, instead of requiring them to be wrapped
  in a Table.

- Support naming test cases.

- Run test cases as subtests with t.Run.
2024-01-11 15:42:43 +00:00

15 lines
157 B
Go

package vals
import (
"testing"
"src.elv.sh/pkg/tt"
)
func TestLen(t *testing.T) {
tt.Test(t, Len,
Args("foobar").Rets(6),
Args(10).Rets(-1),
)
}