profile: testing scaffold

A simple scaffold for testing various profile options and observing the output.

Updates #7 
On Thu, Oct 30, 2014 at 8:48 PM, Gabriel Aszalos <notifications@github.com>
wrote:

> In profile_test.go:
>
> > @@ -0,0 +1,104 @@
> > +package profile
> > +
> > +import (
> > +	"bytes"
> > +	"io/ioutil"
> > +	"os"
> > +	"os/exec"
> > +	"path/filepath"
> > +	"testing"
> > +)
> > +
> > +var profileTests = []struct {
> > +	name   string
> > +	code   string
> > +	checks []func(t *testing.T, stdout, stderr []byte, err error)
>
> Would everything not be easier as:
>
> type checkFn func(t *testing.T, stdout, stderr []byte, err error)
>
> In this way everything would become more readable, and you could drop the
> variadic-to-slice function.
>
so the decl becomes

checks []checkFn ?

That still doesn't remove the need for the vararg helper


> Or do you feel the same way as here
> <https://github.com/pkg/profile/pull/4#discussion-diff-19383042R19> about
> it?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pkg/profile/pull/9/files#r19594860>.
>