aboutsummaryrefslogtreecommitdiffhomepage
path: root/transform
diff options
context:
space:
mode:
Diffstat (limited to 'transform')
-rw-r--r--transform/allocs_test.go4
-rw-r--r--transform/transform_test.go5
2 files changed, 4 insertions, 5 deletions
diff --git a/transform/allocs_test.go b/transform/allocs_test.go
index f4c86f669..27bb9706a 100644
--- a/transform/allocs_test.go
+++ b/transform/allocs_test.go
@@ -2,7 +2,7 @@ package transform_test
import (
"go/token"
- "io/ioutil"
+ "os"
"path/filepath"
"regexp"
"sort"
@@ -62,7 +62,7 @@ func TestAllocs2(t *testing.T) {
}
// Load expected test output (the OUT: lines).
- testInput, err := ioutil.ReadFile("./testdata/allocs2.go")
+ testInput, err := os.ReadFile("./testdata/allocs2.go")
if err != nil {
t.Fatal("could not read test input:", err)
}
diff --git a/transform/transform_test.go b/transform/transform_test.go
index 1c6b5df39..4cab255e6 100644
--- a/transform/transform_test.go
+++ b/transform/transform_test.go
@@ -6,7 +6,6 @@ import (
"flag"
"go/token"
"go/types"
- "io/ioutil"
"os"
"path/filepath"
"strings"
@@ -58,13 +57,13 @@ func testTransform(t *testing.T, pathPrefix string, transform func(mod llvm.Modu
actual = actual[strings.Index(actual, "\ntarget datalayout = ")+1:]
if *update {
- err := ioutil.WriteFile(pathPrefix+".out.ll", []byte(actual), 0666)
+ err := os.WriteFile(pathPrefix+".out.ll", []byte(actual), 0666)
if err != nil {
t.Error("failed to write out new output:", err)
}
} else {
// Read the expected output IR.
- out, err := ioutil.ReadFile(pathPrefix + ".out.ll")
+ out, err := os.ReadFile(pathPrefix + ".out.ll")
if err != nil {
t.Fatalf("could not read output file %s: %v", pathPrefix+".out.ll", err)
}