all: update _test.go files for ioutil changes

This commit is contained in:
Damian Gryski
2022-08-05 16:20:39 -07:00
committed by Ron Evans
parent 1784bcd728
commit f9ba99344a
9 changed files with 18 additions and 22 deletions
+3 -3
View File
@@ -3,7 +3,7 @@ package compiler
import (
"flag"
"go/types"
"io/ioutil"
"os"
"strconv"
"strings"
"testing"
@@ -162,14 +162,14 @@ func TestCompiler(t *testing.T) {
// Update test if needed. Do not check the result.
if *flagUpdate {
err := ioutil.WriteFile(outPath, []byte(mod.String()), 0666)
err := os.WriteFile(outPath, []byte(mod.String()), 0666)
if err != nil {
t.Error("failed to write updated output file:", err)
}
return
}
expected, err := ioutil.ReadFile(outPath)
expected, err := os.ReadFile(outPath)
if err != nil {
t.Fatal("failed to read golden file:", err)
}