Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3f05fdf

Browse files
committedJul 18, 2024··
Removing prints from tests
Signed-off-by: Johan Fylling <[email protected]>
1 parent 59d6e53 commit 3f05fdf

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed
 

‎debug/debugger_test.go

+2-15
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,7 @@ func TestDebuggerAutomaticStop(t *testing.T) {
636636

637637
stk := newTestStack(testEvents...)
638638
eh := newTestEventHandler()
639-
l := logging.New()
640-
l.SetLevel(logging.Debug)
641-
_, s, _ := setupDebuggerSession(ctx, stk, tc.props, eh.HandleEvent, l)
639+
_, s, _ := setupDebuggerSession(ctx, stk, tc.props, eh.HandleEvent, nil)
642640

643641
if err := s.start(); err != nil {
644642
t.Fatalf("Unexpected error: %v", err)
@@ -868,8 +866,6 @@ func TestDebuggerStopOnBreakpoint(t *testing.T) {
868866
}
869867
}
870868

871-
// TODO: Test resume
872-
873869
func TestDebuggerStepIn(t *testing.T) {
874870
tests := []struct {
875871
note string
@@ -978,9 +974,7 @@ func TestDebuggerStepIn(t *testing.T) {
978974
defer close(doneCh)
979975
go func() {
980976
for {
981-
fmt.Println("WAITING FOR EVENT")
982977
e := eh.NextBlocking()
983-
fmt.Printf("EVENT: %v\n", e)
984978

985979
if e == nil || e.Type == TerminatedEventType {
986980
break
@@ -990,7 +984,6 @@ func TestDebuggerStepIn(t *testing.T) {
990984
stoppedAt = append(stoppedAt, e.stackIndex)
991985
}
992986
}
993-
fmt.Println("DONE")
994987
doneCh <- struct{}{}
995988
}()
996989

@@ -1319,9 +1312,7 @@ func TestDebuggerStepOut(t *testing.T) {
13191312
defer close(doneCh)
13201313
go func() {
13211314
for {
1322-
fmt.Println("WAITING FOR EVENT")
13231315
e := eh.NextBlocking()
1324-
fmt.Printf("EVENT: %v\n", e)
13251316

13261317
if e == nil || e.Type == TerminatedEventType {
13271318
break
@@ -1331,7 +1322,6 @@ func TestDebuggerStepOut(t *testing.T) {
13311322
stoppedAt = append(stoppedAt, e.stackIndex)
13321323
}
13331324
}
1334-
fmt.Println("DONE")
13351325
doneCh <- struct{}{}
13361326
}()
13371327

@@ -1467,12 +1457,9 @@ func TestDebuggerStackTrace(t *testing.T) {
14671457
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(5*time.Second))
14681458
defer cancel()
14691459

1470-
l := logging.New()
1471-
l.SetLevel(logging.Debug)
1472-
14731460
stk := newTestStack(tc.events...)
14741461
eh := newTestEventHandler()
1475-
_, s, thr := setupDebuggerSession(ctx, stk, LaunchProperties{}, eh.HandleEvent, l)
1462+
_, s, thr := setupDebuggerSession(ctx, stk, LaunchProperties{}, eh.HandleEvent, nil)
14761463

14771464
if err := s.start(); err != nil {
14781465
t.Fatalf("Unexpected error: %v", err)

0 commit comments

Comments
 (0)
Please sign in to comment.