From 64c6d0410bcc49becc22531dc0ce1731af43c2ee Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Wed, 18 Dec 2013 03:44:50 -0800 Subject: [PATCH] go.tools/imports: fix test broken in b33d2e25015b6793aac4f9dcef3d8a8d1c9243b3 R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/41950048 --- imports/fix_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/imports/fix_test.go b/imports/fix_test.go index e18fd98957..123637ffe5 100644 --- a/imports/fix_test.go +++ b/imports/fix_test.go @@ -5,13 +5,11 @@ package imports import ( - "bytes" "flag" "go/build" "io/ioutil" "os" "path/filepath" - "strings" "testing" ) @@ -472,13 +470,12 @@ func TestFixImports(t *testing.T) { if *only != "" && tt.name != *only { continue } - var buf bytes.Buffer - err := processFile("foo.go", strings.NewReader(tt.in), &buf, false) + buf, err := Process("foo.go", []byte(tt.in), nil) if err != nil { t.Errorf("error on %q: %v", tt.name, err) continue } - if got := buf.String(); got != tt.out { + if got := string(buf); got != tt.out { t.Errorf("results diff on %q\nGOT:\n%s\nWANT:\n%s\n", tt.name, got, tt.out) } }