github.com/mattn/go@v0.0.0-20171011075504-07f7db3ea99f/src/debug/pe/file_cgo_test.go (about)

     1  // Copyright 2017 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  // +build cgo
     6  
     7  package pe
     8  
     9  import (
    10  	"os/exec"
    11  	"testing"
    12  )
    13  
    14  func testCgoDWARF(t *testing.T, linktype int) {
    15  	if _, err := exec.LookPath("gcc"); err != nil {
    16  		t.Skip("skipping test: gcc is missing")
    17  	}
    18  	testDWARF(t, linktype)
    19  }
    20  
    21  func TestDefaultLinkerDWARF(t *testing.T) {
    22  	testCgoDWARF(t, linkCgoDefault)
    23  }
    24  
    25  func TestInternalLinkerDWARF(t *testing.T) {
    26  	testCgoDWARF(t, linkCgoInternal)
    27  }
    28  
    29  func TestExternalLinkerDWARF(t *testing.T) {
    30  	testCgoDWARF(t, linkCgoExternal)
    31  }