...

Source file src/debug/pe/file_cgo_test.go

Documentation: debug/pe

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

View as plain text