aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/newlink/layout_test.go
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2015-08-06 03:45:35 +0000
committerAndrew Gerrand <adg@golang.org>2015-08-06 04:06:12 +0000
commit0d20a61e68ba22fb416fe2aa8b6532026822bad0 (patch)
tree577de59a5d28417196964e7a20aff1fa6c8fb529 /src/cmd/newlink/layout_test.go
parente7f6a244a2a1c9a597a96356476484157c3c19f8 (diff)
downloadgo1.5rc1.tar.xz
[release-branch.go1.5] cmd/newlink: remove from release branchgo1.5rc1
Change-Id: Iad86bde6f2e0482745a4000ec4e192ade352983b Reviewed-on: https://go-review.googlesource.com/13292 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/newlink/layout_test.go')
-rw-r--r--src/cmd/newlink/layout_test.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/cmd/newlink/layout_test.go b/src/cmd/newlink/layout_test.go
deleted file mode 100644
index e5513af35e..0000000000
--- a/src/cmd/newlink/layout_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// 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 main
-
-import (
- "bytes"
- "strings"
- "testing"
-)
-
-func TestLayout(t *testing.T) {
- p := Prog{GOOS: "darwin", GOARCH: "amd64", StartSym: "text_start"}
- p.omitRuntime = true
- p.Error = func(s string) { t.Error(s) }
- var buf bytes.Buffer
- const obj = "testdata/layout.6"
- p.link(&buf, obj)
- if p.NumError > 0 {
- return // already reported
- }
- if len(p.Dead) > 0 {
- t.Errorf("%s: unexpected dead symbols %v", obj, p.Dead)
- return
- }
-
- for _, sym := range p.SymOrder {
- if p.isAuto(sym.SymID) {
- continue
- }
- if sym.Section == nil {
- t.Errorf("%s: symbol %s is missing section", obj, sym)
- continue
- }
- i := strings.Index(sym.Name, "_")
- if i < 0 {
- t.Errorf("%s: unexpected symbol %s", obj, sym)
- continue
- }
- if sym.Section.Name != sym.Name[:i] {
- t.Errorf("%s: symbol %s in section %s, want %s", obj, sym, sym.Section.Name, sym.Name[:i])
- }
- }
-}