From c19baa10f8e8365ed9e3212a003a6b8f31f0320a Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 9 May 2020 15:42:57 +0200 Subject: tests: use t.Name() We did not use t.Name() as it was not available before Go 1.8. Now the oldest Go version we support is Go 1.11, so we can use it. --- tests/reverse/correctness_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/reverse') diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go index 67edeb6..206bebd 100644 --- a/tests/reverse/correctness_test.go +++ b/tests/reverse/correctness_test.go @@ -225,9 +225,7 @@ func TestTooLongSymlink(t *testing.T) { // all directories in the path with O_RDONLY. Now it uses O_PATH, which only needs // the executable bit. func Test0100Dir(t *testing.T) { - // Note: t.Name() is not available before in Go 1.8 - tName := "Test0100Dir" - dir := dirA + "/" + tName + dir := dirA + "/" + t.Name() err := os.Mkdir(dir, 0700) if err != nil { t.Fatal(err) @@ -242,7 +240,7 @@ func Test0100Dir(t *testing.T) { t.Fatal(err) } - fileReverse := dirC + "/" + tName + "/hello" + fileReverse := dirC + "/" + t.Name() + "/hello" fd, err := os.Open(fileReverse) // Make sure the dir can be removed after the test is done os.Chmod(dir, 0700) -- cgit v1.2.3