Skip to content

Commit

Permalink
proc: fixed TestStepConcurrentPtr
Browse files Browse the repository at this point in the history
Implementation of nextInProgress was wrong.
  • Loading branch information
aarzilli committed Oct 3, 2016
1 parent 4cfa7a5 commit 2d29759
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions proc/proc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2087,8 +2087,8 @@ func TestStepConcurrentDirect(t *testing.T) {
}

func nextInProgress(p *Process) bool {
for _, th := range p.Threads {
if th.CurrentBreakpoint != nil && th.CurrentBreakpoint.Internal() {
for _, bp := range p.Breakpoints {
if bp.Internal() {
return true
}
}
Expand Down Expand Up @@ -2138,13 +2138,13 @@ func TestStepConcurrentPtr(t *testing.T) {
assertNoError(p.Continue(), t, "Continue()")
}

f, ln = currentLineNumber(p, t)
if ln != 13 {
t.Fatalf("Step did not step into function call (13): %s:%d (gid: %d)", f, ln, p.SelectedGoroutine.ID)
if p.SelectedGoroutine.ID != gid {
t.Fatalf("Step switched goroutines (wanted: %d got: %d)", gid, p.SelectedGoroutine.ID)
}

if p.SelectedGoroutine.ID != gid {
t.Fatalf("Step switched goroutines (%d %d)", gid, p.SelectedGoroutine.ID)
f, ln = currentLineNumber(p, t)
if ln != 13 {
t.Fatalf("Step did not step into function call (13): %s:%d", f, ln, gid, p.SelectedGoroutine.ID)
}

count++
Expand Down

0 comments on commit 2d29759

Please sign in to comment.