2014-01-30 10:25:47 -07:00
|
|
|
// Copyright 2014 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package cgotest
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
// This test actually doesn't have anything to do with cgo. It is a
|
2015-07-10 17:17:11 -06:00
|
|
|
// test of https://golang.org/issue/7234, a compiler/linker bug in
|
2014-01-30 10:25:47 -07:00
|
|
|
// handling string constants when using -linkmode=external. The test
|
|
|
|
// is in this directory because we routinely test -linkmode=external
|
|
|
|
// here.
|
|
|
|
|
|
|
|
var v7234 = [...]string{"runtime/cgo"}
|
|
|
|
|
2015-01-11 22:12:59 -07:00
|
|
|
func Test7234(t *testing.T) {
|
2014-01-30 10:25:47 -07:00
|
|
|
if v7234[0] != "runtime/cgo" {
|
|
|
|
t.Errorf("bad string constant %q", v7234[0])
|
|
|
|
}
|
|
|
|
}
|