diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-07-27 22:35:47 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-07-27 22:35:47 +0200 |
commit | 694ac808eba5c0036343d4acc2d1692a54677645 (patch) | |
tree | 60c39d03aa8cad310e3dee74cde101c76cd78526 /skate/testutil | |
parent | 042ed5693d951205f5153c1868eeb29f8398f688 (diff) | |
download | refcat-694ac808eba5c0036343d4acc2d1692a54677645.tar.gz refcat-694ac808eba5c0036343d4acc2d1692a54677645.zip |
tests: use more sensible names
Diffstat (limited to 'skate/testutil')
-rw-r--r-- | skate/testutil/extra.go | 8 |
1 files changed, 4 insertions, 4 deletions
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 |