projects
/
platform
/
upstream
/
gcc48.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 4.8.1
[platform/upstream/gcc48.git]
/
libgo
/
go
/
debug
/
gosym
/
pclntab_test.go
diff --git
a/libgo/go/debug/gosym/pclntab_test.go
b/libgo/go/debug/gosym/pclntab_test.go
index
ade7043
..
20acba6
100644
(file)
--- a/
libgo/go/debug/gosym/pclntab_test.go
+++ b/
libgo/go/debug/gosym/pclntab_test.go
@@
-52,6
+52,14
@@
func dotest() bool {
return true
}
return true
}
+func endtest() {
+ if pclineTempDir != "" {
+ os.RemoveAll(pclineTempDir)
+ pclineTempDir = ""
+ pclinetestBinary = ""
+ }
+}
+
func getTable(t *testing.T) *Table {
f, tab := crack(os.Args[0], t)
f.Close()
func getTable(t *testing.T) *Table {
f, tab := crack(os.Args[0], t)
f.Close()
@@
-95,6
+103,7
@@
func TestLineFromAline(t *testing.T) {
if !dotest() {
return
}
if !dotest() {
return
}
+ defer endtest()
tab := getTable(t)
tab := getTable(t)
@@
-129,7
+138,7
@@
func TestLineFromAline(t *testing.T) {
if !ok {
t.Errorf("file %s starts on line %d", path, line)
} else if line != ll+1 {
if !ok {
t.Errorf("file %s starts on line %d", path, line)
} else if line != ll+1 {
- t.
Error
f("expected next line of file %s to be %d, got %d", path, ll+1, line)
+ t.
Fatal
f("expected next line of file %s to be %d, got %d", path, ll+1, line)
}
lastline[path] = line
}
}
lastline[path] = line
}
@@
-142,6
+151,7
@@
func TestLineAline(t *testing.T) {
if !dotest() {
return
}
if !dotest() {
return
}
+ defer endtest()
tab := getTable(t)
tab := getTable(t)
@@
-183,7
+193,7
@@
func TestPCLine(t *testing.T) {
if !dotest() {
return
}
if !dotest() {
return
}
- defer
os.RemoveAll(pclineTempDir
)
+ defer
endtest(
)
f, tab := crack(pclinetestBinary, t)
text := f.Section(".text")
f, tab := crack(pclinetestBinary, t)
text := f.Section(".text")