all: update _test.go files for os.IsFoo changes

This commit is contained in:
Damian Gryski
2022-08-05 16:21:07 -07:00
committed by Ron Evans
parent f9ba99344a
commit f12ddfe164
2 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -1,7 +1,8 @@
package compileopts
import (
"os"
"errors"
"io/fs"
"reflect"
"testing"
)
@@ -17,7 +18,7 @@ func TestLoadTarget(t *testing.T) {
t.Error("LoadTarget should have failed with non existing target")
}
if !os.IsNotExist(err) {
if !errors.Is(err, fs.ErrNotExist) {
t.Error("LoadTarget failed for wrong reason:", err)
}
}