diff options
Diffstat (limited to 'src/pkg/exp/datafmt/datafmt_test.go')
-rw-r--r-- | src/pkg/exp/datafmt/datafmt_test.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/pkg/exp/datafmt/datafmt_test.go b/src/pkg/exp/datafmt/datafmt_test.go index 908894717..f6a09f820 100644 --- a/src/pkg/exp/datafmt/datafmt_test.go +++ b/src/pkg/exp/datafmt/datafmt_test.go @@ -7,11 +7,15 @@ package datafmt import ( "fmt" "testing" + "go/token" ) +var fset = token.NewFileSet() + + func parse(t *testing.T, form string, fmap FormatterMap) Format { - f, err := Parse("", []byte(form), fmap) + f, err := Parse(fset, "", []byte(form), fmap) if err != nil { t.Errorf("Parse(%s): %v", form, err) return nil @@ -24,7 +28,7 @@ func verify(t *testing.T, f Format, expected string, args ...interface{}) { if f == nil { return // allow other tests to run } - result := f.Sprint(args) + result := f.Sprint(args...) if result != expected { t.Errorf( "result : `%s`\nexpected: `%s`\n\n", @@ -97,7 +101,7 @@ func check(t *testing.T, form, expected string, args ...interface{}) { if f == nil { return // allow other tests to run } - result := f.Sprint(args) + result := f.Sprint(args...) if result != expected { t.Errorf( "format : %s\nresult : `%s`\nexpected: `%s`\n\n", |