Skip to content

Commit

Permalink
card-tricks: Check if index is >= len(slice)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBleu committed Feb 24, 2024
1 parent 058962e commit 8aa2d28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/concept/card-tricks/card_tricks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestGetItem(t *testing.T) {
name: "Index out of bounds",
args: args{
slice: []int{5, 2, 10, 6, 8, 7, 0, 9},
index: 8,
index: 9,
},
want: -1,
},
Expand Down

0 comments on commit 8aa2d28

Please sign in to comment.