From 694ac808eba5c0036343d4acc2d1692a54677645 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 27 Jul 2021 22:35:47 +0200 Subject: tests: use more sensible names --- skate/testutil/extra.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'skate/testutil') diff --git a/skate/testutil/extra.go b/skate/testutil/extra.go index cb533c3..7537f75 100644 --- a/skate/testutil/extra.go +++ b/skate/testutil/extra.go @@ -8,9 +8,9 @@ import ( "git.archive.org/martin/cgraph/skate/atomic" ) -// EqualsFilename returns true, if the contents of a given buffer matches the +// BufferFileEquals returns true, if the contents of a given buffer matches the // contents of a file given by filename. -func EqualsFilename(buf *bytes.Buffer, filename string) (bool, error) { +func BufferFileEquals(buf *bytes.Buffer, filename string) (bool, error) { b, err := ioutil.ReadFile(filename) if err != nil { return false, err @@ -22,9 +22,9 @@ func EqualsFilename(buf *bytes.Buffer, filename string) (bool, error) { return reflect.DeepEqual(b, bb), nil } -// TempWriteFile writes the content of a buffer to a temporary file and returns +// BufferToTemp writes the content of a buffer to a temporary file and returns // its path. -func TempWriteFile(buf *bytes.Buffer) (string, error) { +func BufferToTemp(buf *bytes.Buffer) (string, error) { f, err := ioutil.TempFile("", "skate-test-*") if err != nil { return "", err -- cgit v1.2.3