github.com/corona10/go@v0.0.0-20180224231303-7a218942be57/src/cmd/compile/internal/syntax/dumper_test.go (about) 1 // Copyright 2016 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package syntax 6 7 import ( 8 "os" 9 "testing" 10 ) 11 12 func TestDump(t *testing.T) { 13 if testing.Short() { 14 t.Skip("skipping test in short mode") 15 } 16 17 // provide a dummy error handler so parsing doesn't stop after first error 18 ast, err := ParseFile(*src_, func(error) {}, nil, CheckBranches) 19 if err != nil { 20 t.Error(err) 21 } 22 23 if ast != nil { 24 Fdump(os.Stdout, ast) 25 } 26 }