Text file src/cmd/go/testdata/script/cover_blank_func_decl.txt

     1  [short] skip
     2  go test -cover coverblank
     3  stdout 'coverage: 100.0% of statements'
     4  
     5  
     6  -- go.mod --
     7  module coverblank
     8  
     9  go 1.16
    10  -- a.go --
    11  package coverblank
    12  
    13  func _() {
    14  	println("unreachable")
    15  }
    16  
    17  type X int
    18  
    19  func (x X) Print() {
    20  	println(x)
    21  }
    22  
    23  func (x X) _() {
    24  	println("unreachable")
    25  }
    26  
    27  -- a_test.go --
    28  package coverblank
    29  
    30  import "testing"
    31  
    32  func TestX(t *testing.T) {
    33  	var x X
    34  	x.Print()
    35  }
    36  

View as plain text