Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(245)

Side by Side Diff: debug/dwarf/pclntab_test.go

Issue 124280044: code review 124280044: dwarf: fix broken tests, due to name change in (Closed)
Patch Set: diff -r a875c179a54f https://code.google.com/p/ogle Created 9 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « debug/dwarf/frame_test.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package dwarf_test 5 package dwarf_test
6 6
7 // Stripped-down, simplified version of ../../gosym/pclntab_test.go 7 // Stripped-down, simplified version of ../../gosym/pclntab_test.go
8 8
9 import ( 9 import (
10 "fmt" 10 "fmt"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 defer endtest() 110 defer endtest()
111 111
112 data, err := getData(pclinetestBinary) 112 data, err := getData(pclinetestBinary)
113 if err != nil { 113 if err != nil {
114 t.Fatal(err) 114 t.Fatal(err)
115 } 115 }
116 116
117 // Test PCToLine. 117 // Test PCToLine.
118 // TODO: Do much more than this. 118 // TODO: Do much more than this.
119 » pc, err := data.LookupSym("linefrompc") 119 » pc, err := data.LookupFunction("linefrompc")
120 if err != nil { 120 if err != nil {
121 t.Fatal(err) 121 t.Fatal(err)
122 } 122 }
123 file, line, err := data.PCToLine(pc) 123 file, line, err := data.PCToLine(pc)
124 if err != nil { 124 if err != nil {
125 t.Fatal(err) 125 t.Fatal(err)
126 } 126 }
127 // We expect <longpath>/pclinetest.asm, line 13. 127 // We expect <longpath>/pclinetest.asm, line 13.
128 if !strings.HasSuffix(file, "/pclinetest.asm") { 128 if !strings.HasSuffix(file, "/pclinetest.asm") {
129 t.Errorf("got %s; want %s", file, ".../pclinetest.asm") 129 t.Errorf("got %s; want %s", file, ".../pclinetest.asm")
130 } 130 }
131 if line != 13 { 131 if line != 13 {
132 t.Errorf("got %d; want %d", line, 13) 132 t.Errorf("got %d; want %d", line, 13)
133 } 133 }
134 } 134 }
OLDNEW
« no previous file with comments | « debug/dwarf/frame_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b