mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 01:40:31 +08:00
6e36058d0a
- 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.
15 lines
249 B
Go
15 lines
249 B
Go
package vals
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"src.elv.sh/pkg/tt"
|
|
)
|
|
|
|
func TestErrors(t *testing.T) {
|
|
tt.Test(t, error.Error,
|
|
Args(cannotIterate{"num"}).Rets("cannot iterate num"),
|
|
Args(cannotIterateKeysOf{"num"}).Rets("cannot iterate keys of num"),
|
|
)
|
|
}
|