Skip to content

Commit a722b14

Browse files
committed
✨ (sum_tail_test): add sum_tails_test
1 parent 5bfba46 commit a722b14

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arrays-and-slices/sum_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,13 @@ func TestSumAll(t *testing.T) {
3838
t.Errorf("got %v want %v", got, want)
3939
}
4040
}
41+
42+
func TestSumAllTails(t *testing.T) {
43+
44+
got := SumAllTails([]int{1, 2}, int{0, 9})
45+
want := []int{2, 9}
46+
47+
if !reflect.DeepEqual(got, want) {
48+
t.Errorf("got %v, want %v", got, want)
49+
}
50+
}

0 commit comments

Comments
 (0)