We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bfba46 commit a722b14Copy full SHA for a722b14
arrays-and-slices/sum_test.go
@@ -38,3 +38,13 @@ func TestSumAll(t *testing.T) {
38
t.Errorf("got %v want %v", got, want)
39
}
40
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