1
0
mirror of https://github.com/golang/go synced 2024-11-25 08:57:58 -07:00

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
This commit is contained in:
Anthony Martin 2012-02-27 10:01:45 -08:00 committed by Robert Griesemer
parent 56ae9032b2
commit 0706d00cb8
3 changed files with 7 additions and 10 deletions

View File

@ -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
}
}
}

View File

@ -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 (

View File

@ -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 (