diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-08-03 17:26:15 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-08-03 17:31:49 +0200 |
| commit | b757d264230d65f988e08158e096a09497d39eb4 (patch) | |
| tree | e20ec608a2ec8ebf603fa7aa060eb9723c4780b9 /src/pkg/go/printer/printer_test.go | |
| parent | 5976088995f5c0d0bcada7d491fda4b6245e54e0 (diff) | |
| download | golang-b757d264230d65f988e08158e096a09497d39eb4.tar.gz | |
Imported Upstream version 2011.07.29
Diffstat (limited to 'src/pkg/go/printer/printer_test.go')
| -rw-r--r-- | src/pkg/go/printer/printer_test.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/pkg/go/printer/printer_test.go b/src/pkg/go/printer/printer_test.go index 090f92af1..ff2d906b5 100644 --- a/src/pkg/go/printer/printer_test.go +++ b/src/pkg/go/printer/printer_test.go @@ -16,19 +16,15 @@ import ( "time" ) - const ( dataDir = "testdata" tabwidth = 8 ) - var update = flag.Bool("update", false, "update golden files") - var fset = token.NewFileSet() - func lineString(text []byte, i int) string { i0 := i for i < len(text) && text[i] != '\n' { @@ -37,7 +33,6 @@ func lineString(text []byte, i int) string { return string(text[i0:i]) } - type checkMode uint const ( @@ -45,7 +40,6 @@ const ( rawFormat ) - func runcheck(t *testing.T, source, golden string, mode checkMode) { // parse source prog, err := parser.ParseFile(fset, source, nil, parser.ParseComments) @@ -109,7 +103,6 @@ func runcheck(t *testing.T, source, golden string, mode checkMode) { } } - func check(t *testing.T, source, golden string, mode checkMode) { // start a timer to produce a time-out signal tc := make(chan int) @@ -135,7 +128,6 @@ func check(t *testing.T, source, golden string, mode checkMode) { } } - type entry struct { source, golden string mode checkMode @@ -154,7 +146,6 @@ var data = []entry{ {"slow.input", "slow.golden", 0}, } - func TestFiles(t *testing.T) { for i, e := range data { source := filepath.Join(dataDir, e.source) @@ -168,7 +159,6 @@ func TestFiles(t *testing.T) { } } - // TestLineComments, using a simple test case, checks that consequtive line // comments are properly terminated with a newline even if the AST position // information is incorrect. |
