Debian Codegraph @

gcc/testsuite/go.test/test/fixedbugs/issue9862_run.go

raw
1 // +build !nacl,!js,gc
2 // run
3
4 // Copyright 2015 The Go Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style
6 // license that can be found in the LICENSE file.
7
8 // Check for compile or link error.
9
10 package main
11
12 import (
13 "os/exec"
14 "strings"
15 )
16
17 func main() {
18 out, err := exec.Command("go", "run", "fixedbugs/issue9862.go").CombinedOutput()
19 outstr := string(out)
20 if err == nil {
21 println("go run issue9862.go succeeded, should have failed\n", outstr)
22 return
23 }
24 if !strings.Contains(outstr, "symbol too large") {
25 println("go run issue9862.go gave unexpected error; want symbol too large:\n", outstr)
26 }
27 }