diff options
Diffstat (limited to 'skate/testutil/extra.go')
-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 |