TestStringSlice_Set: check error even if none is returned
This commit is contained in:
parent
710ebdcef5
commit
7ec39ebb4e
|
@ -22,7 +22,10 @@ func TestStringSlice_Set(t *testing.T) {
|
|||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
for _, value := range tt.args.values {
|
||||
tt.s.Set(value)
|
||||
err := tt.s.Set(value)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
if diff := cmp.Diff(tt.s, tt.wantStringSlice); diff != "" {
|
||||
t.Fatal(diff)
|
||||
|
|
Loading…
Reference in New Issue