Black Lives Matter. Support the Equal Justice Initiative.

Source file src/cmd/compile/internal/syntax/dumper_test.go

Documentation: cmd/compile/internal/syntax

     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 no-op 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  }
    26  

View as plain text