]> Cypherpunks repositories - gostls13.git/commitdiff
go/printer: fix test for new import path restrictions
authorAnthony Martin <ality@pbrane.org>
Mon, 27 Feb 2012 18:01:45 +0000 (10:01 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 27 Feb 2012 18:01:45 +0000 (10:01 -0800)
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

src/pkg/go/printer/printer_test.go
src/pkg/go/printer/testdata/declarations.golden
src/pkg/go/printer/testdata/declarations.input

index 2d4f61356c19f6d67f3d0ad6b7a3dcdc40129886..497d671f240bd06fe71c0ddc7fa6288d47087cc0 100644 (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
-               }
        }
 }
 
index 928b8ce0a9f826b1f9bf92b72493cbd82c7c19c0..a46463e56e6609476710cce8fa83b00b97351d5e 100644 (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 (
index 68f90308a362b942fb55a72ffe682346d5caeddf..df8c2b167e16bcb719196f47d462184ee74e4337 100644 (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 (