• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2014 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
5package cgotest
6
7import "testing"
8
9// This test actually doesn't have anything to do with cgo.  It is a
10// test of https://golang.org/issue/7234, a compiler/linker bug in
11// handling string constants when using -linkmode=external.  The test
12// is in this directory because we routinely test -linkmode=external
13// here.
14
15var v7234 = [...]string{"runtime/cgo"}
16
17func Test7234(t *testing.T) {
18	if v7234[0] != "runtime/cgo" {
19		t.Errorf("bad string constant %q", v7234[0])
20	}
21}
22