mirror of
https://github.com/golang/go
synced 2024-09-28 18:14:29 -06:00
adjust the indexes in Delete panic test case
This commit is contained in:
parent
600069cd14
commit
885c1afb5d
@ -675,7 +675,7 @@ func TestDeletePanics(t *testing.T) {
|
||||
{"with out-of-bounds both indexes", []int{42}, 2, 2},
|
||||
{"with invalid i>j", []int{42}, 1, 0},
|
||||
{"s[i:j] is valid and j > len(s)", s, 0, 4},
|
||||
{"s[i:j] is valid and i == j > len(s)", s, 4, 4},
|
||||
{"s[i:j] is valid and i == j > len(s)", s, 3, 3},
|
||||
} {
|
||||
if !panics(func() { Delete(test.s, test.i, test.j) }) {
|
||||
t.Errorf("Delete %s: got no panic, want panic", test.name)
|
||||
|
Loading…
Reference in New Issue
Block a user