template: add some missing test cases for First

This commit is contained in:
bep
2015-03-18 20:47:10 +01:00
parent b15d0a168f
commit a8bfaba081
2 changed files with 8 additions and 0 deletions

View File

@@ -231,6 +231,9 @@ func TestFirst(t *testing.T) {
{"1", []int{100, 200, 300}, []int{100}},
{int64(-1), []int{100, 200, 300}, false},
{"noint", []int{100, 200, 300}, false},
{1, nil, false},
{nil, []int{100}, false},
{1, t, false},
} {
results, err := First(this.count, this.sequence)
if b, ok := this.expect.(bool); ok && !b {