Debian Codegraph @

src/cmd/nm/nm_cgo_test.go

raw
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 package main
6
7 import (
8 "internal/testenv"
9 "testing"
10 )
11
12 func TestInternalLinkerCgoExec(t *testing.T) {
13 testenv.MustHaveCGO(t)
14 // N.B. the go build explictly doesn't pass through
15 // -asan/-msan/-race, so we don't care about those.
16 testenv.MustInternalLink(t, testenv.SpecialBuildTypes{Cgo: true})
17 testGoExec(t, true, false)
18 }
19
20 func TestExternalLinkerCgoExec(t *testing.T) {
21 testenv.MustHaveCGO(t)
22 testGoExec(t, true, true)
23 }
24
25 func TestCgoLib(t *testing.T) {
26 testenv.MustHaveCGO(t)
27 testGoLib(t, true)
28 }