| // 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. |
| func TestPrint(t *testing.T) { |
| t.Skip("skipping test in short mode") |
| ast, err := ParseFile(*src_, nil, nil, 0) |
| Fprint(os.Stdout, ast, true) |
| func TestPrintString(t *testing.T) { |
| for _, want := range []string{ |
| "package p; type _ = int; type T1 = struct{}; type ( _ = *struct{}; T2 = float32 )", |
| ast, err := Parse(nil, strings.NewReader(want), nil, nil, nil, 0) |
| if got := String(ast); got != want { |
| t.Errorf("%q: got %q", want, got) |