2016-03-04 17:09:08 -08:00
|
|
|
// Copyright 2016 The Go Authors. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
package syntax
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestDump(t *testing.T) {
|
|
|
|
|
if testing.Short() {
|
|
|
|
|
t.Skip("skipping test in short mode")
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-26 14:52:32 -07:00
|
|
|
ast, _ := ParseFile(*src_, func(err error) { t.Error(err) }, nil, CheckBranches|AllowGenerics)
|
2018-02-14 16:59:36 -08:00
|
|
|
|
|
|
|
|
if ast != nil {
|
2019-10-29 09:27:57 -07:00
|
|
|
Fdump(testOut(), ast)
|
2016-03-04 17:09:08 -08:00
|
|
|
}
|
|
|
|
|
}
|