Skip to content

Commit

Permalink
Add more assertions for Tail and Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
thoas committed Jan 15, 2017
1 parent 82453fa commit f9acc27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scan_test.go
Expand Up @@ -71,11 +71,15 @@ func TestLast(t *testing.T) {
func TestTail(t *testing.T) {
is := assert.New(t)

is.Equal(Tail([]int{}), []int{})
is.Equal(Tail([]int{1}), []int{1})
is.Equal(Tail([]int{1, 2, 3, 4}), []int{2, 3, 4})
}

func TestInitial(t *testing.T) {
is := assert.New(t)

is.Equal(Initial([]int{}), []int{})
is.Equal(Initial([]int{1}), []int{1})
is.Equal(Initial([]int{1, 2, 3, 4}), []int{1, 2, 3})
}

0 comments on commit f9acc27

Please sign in to comment.