github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/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 "testing" 9 ) 10 11 func TestDump(t *testing.T) { 12 if testing.Short() { 13 t.Skip("skipping test in short mode") 14 } 15 16 // provide a dummy error handler so parsing doesn't stop after first error 17 ast, err := ParseFile(*src_, func(error) {}, nil, CheckBranches) 18 if err != nil { 19 t.Error(err) 20 } 21 22 if ast != nil { 23 Fdump(testOut(), ast) 24 } 25 }