From: Anthony Martin Date: Mon, 27 Feb 2012 18:01:45 +0000 (-0800) Subject: go/printer: fix test for new import path restrictions X-Git-Tag: weekly.2012-03-04~132 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0706d00cb8af873b82a0a0878e595a4369a76e52;p=gostls13.git go/printer: fix test for new import path restrictions Import paths with spaces are now invalid. The builders would've caught this if they were running the long tests. I've removed the check for short tests in this package since the current tests are fast enough already. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5694082 --- diff --git a/src/pkg/go/printer/printer_test.go b/src/pkg/go/printer/printer_test.go index 2d4f61356c..497d671f24 100644 --- a/src/pkg/go/printer/printer_test.go +++ b/src/pkg/go/printer/printer_test.go @@ -154,15 +154,12 @@ var data = []entry{ } func TestFiles(t *testing.T) { - for i, e := range data { + for _, e := range data { source := filepath.Join(dataDir, e.source) golden := filepath.Join(dataDir, e.golden) check(t, source, golden, e.mode) // TODO(gri) check that golden is idempotent //check(t, golden, golden, e.mode) - if testing.Short() && i >= 3 { - break - } } } diff --git a/src/pkg/go/printer/testdata/declarations.golden b/src/pkg/go/printer/testdata/declarations.golden index 928b8ce0a9..a46463e56e 100644 --- a/src/pkg/go/printer/testdata/declarations.golden +++ b/src/pkg/go/printer/testdata/declarations.golden @@ -83,13 +83,13 @@ import ( // more import examples import ( "xxx" - "much longer name" // comment - "short name" // comment + "much_longer_name" // comment + "short_name" // comment ) import ( _ "xxx" - "much longer name" // comment + "much_longer_name" // comment ) import ( diff --git a/src/pkg/go/printer/testdata/declarations.input b/src/pkg/go/printer/testdata/declarations.input index 68f90308a3..df8c2b167e 100644 --- a/src/pkg/go/printer/testdata/declarations.input +++ b/src/pkg/go/printer/testdata/declarations.input @@ -84,13 +84,13 @@ import ( // more import examples import ( "xxx" - "much longer name" // comment - "short name" // comment + "much_longer_name" // comment + "short_name" // comment ) import ( _ "xxx" - "much longer name" // comment + "much_longer_name" // comment ) import (