From e404917db738f51b34250c28a9f4604ab4dc6afd Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Tue, 29 Aug 2023 15:44:18 +0300 Subject: [PATCH] pkg,service: fix typos in comments, exceptions, tests (#3486) --- cmd/dlv/dlv_test.go | 2 +- pkg/proc/proc_test.go | 2 +- pkg/proc/stack_sigtramp.go | 2 +- pkg/proc/variables.go | 2 +- pkg/terminal/starbind/conv_test.go | 2 +- service/dap/server_test.go | 2 +- service/debugger/debugger.go | 2 +- service/test/integration2_test.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/dlv/dlv_test.go b/cmd/dlv/dlv_test.go index 4ac90563..550e7290 100644 --- a/cmd/dlv/dlv_test.go +++ b/cmd/dlv/dlv_test.go @@ -995,7 +995,7 @@ func TestTracePid(t *testing.T) { assertNoError(targetCmd.Start(), t, "execute issue2023") if targetCmd.Process == nil || targetCmd.Process.Pid == 0 { - t.Fatal("expected target process runninng") + t.Fatal("expected target process running") } defer targetCmd.Process.Kill() diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go index 968dcaa9..8e401062 100644 --- a/pkg/proc/proc_test.go +++ b/pkg/proc/proc_test.go @@ -4565,7 +4565,7 @@ func TestCallConcurrent(t *testing.T) { gid2 := p.SelectedGoroutine().ID t.Logf("starting second injection in %d / %d", p.SelectedGoroutine().ID, p.CurrentThread().ThreadID()) - assertNoError(proc.EvalExpressionWithCalls(grp, p.SelectedGoroutine(), "Foo(10, 2)", normalLoadConfig, false), t, "EvalExpressioniWithCalls") + assertNoError(proc.EvalExpressionWithCalls(grp, p.SelectedGoroutine(), "Foo(10, 2)", normalLoadConfig, false), t, "EvalExpressionWithCalls") for { returned += testCallConcurrentCheckReturns(p, t, gid1, gid2) diff --git a/pkg/proc/stack_sigtramp.go b/pkg/proc/stack_sigtramp.go index bbf0fe52..f66025f9 100644 --- a/pkg/proc/stack_sigtramp.go +++ b/pkg/proc/stack_sigtramp.go @@ -102,7 +102,7 @@ func (it *stackIterator) readSigtrampgoContext() (*op.DwarfRegisters, error) { case "arm64": return sigtrampContextDarwinARM64(it.mem, addr) default: - return nil, errors.New("not implemnted") + return nil, errors.New("not implemented") } default: return nil, errors.New("not implemented") diff --git a/pkg/proc/variables.go b/pkg/proc/variables.go index c1b391ca..60c13f96 100644 --- a/pkg/proc/variables.go +++ b/pkg/proc/variables.go @@ -50,7 +50,7 @@ const ( FloatIsNormal floatSpecial = iota // FloatIsNaN means the float is a special NaN value. FloatIsNaN - // FloatIsPosInf means the float is a special positive inifitiy value. + // FloatIsPosInf means the float is a special positive infinity value. FloatIsPosInf // FloatIsNegInf means the float is a special negative infinity value. FloatIsNegInf diff --git a/pkg/terminal/starbind/conv_test.go b/pkg/terminal/starbind/conv_test.go index 34c613aa..85e3062a 100644 --- a/pkg/terminal/starbind/conv_test.go +++ b/pkg/terminal/starbind/conv_test.go @@ -7,7 +7,7 @@ import ( func TestConv(t *testing.T) { script := ` -# A list global that we'll unmarhsal into a slice. +# A list global that we'll unmarshal into a slice. x = [1,2] ` globals, err := starlark.ExecFile(&starlark.Thread{}, "test.star", script, nil) diff --git a/service/dap/server_test.go b/service/dap/server_test.go index 7b818a6f..26b642d7 100644 --- a/service/dap/server_test.go +++ b/service/dap/server_test.go @@ -2176,7 +2176,7 @@ func TestVariablesLoading(t *testing.T) { checkChildren(t, tm, "tm", 1) ref = checkVarExact(t, tm, 0, "v", "", "[]map[string]main.astruct len: 1, cap: 1, [[...]]", "[]map[string]main.astruct", hasChildren) if ref > 0 { - // Auto-loading of fully missing map chidlren happens here, but they get trancated at MaxArrayValuess + // Auto-loading of fully missing map chidlren happens here, but they get trancated at MaxArrayValues client.VariablesRequest(ref) tmV := client.ExpectVariablesResponse(t) checkChildren(t, tmV, "tm.v", 1) diff --git a/service/debugger/debugger.go b/service/debugger/debugger.go index 3e73621c..291957a5 100644 --- a/service/debugger/debugger.go +++ b/service/debugger/debugger.go @@ -2248,7 +2248,7 @@ func (d *Debugger) DumpWait(wait time.Duration) *proc.DumpState { return &d.dumpState } -// DumpCancel canels a dump in progress +// DumpCancel cancels a dump in progress func (d *Debugger) DumpCancel() error { d.dumpState.Mutex.Lock() d.dumpState.Canceled = true diff --git a/service/test/integration2_test.go b/service/test/integration2_test.go index 2d7f64f7..fa41dbfc 100644 --- a/service/test/integration2_test.go +++ b/service/test/integration2_test.go @@ -2987,7 +2987,7 @@ func TestClientServer_createBreakpointWithID(t *testing.T) { } func TestClientServer_autoBreakpoints(t *testing.T) { - // Check that unrecoverd-panic and fatal-throw breakpoints are visible in + // Check that unrecovered-panic and fatal-throw breakpoints are visible in // the breakpoint list. protest.AllowRecording(t) withTestClient2("math", t, func(c service.Client) {