summaryrefslogtreecommitdiff
path: root/src/pkg/go/printer/printer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/go/printer/printer_test.go')
-rw-r--r--src/pkg/go/printer/printer_test.go10
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.