未验证 提交 252bcc4e 编写于 作者: S Suzy Mueller 提交者: GitHub

service/dap: fix continueOnEntryTest (#2489)

Accept the empty response in case the threads request arrived after the program
terminated
上级 5fa4a352
......@@ -437,9 +437,9 @@ func TestContinueOnEntry(t *testing.T) {
}
// Single current thread is sent when the program is running
// because DAP spec expects at least one thread.
// TODO(polina): accept empty already-terminated response here as well?
if len(m.Body.Threads) != 1 || m.Body.Threads[0].Id != -1 || m.Body.Threads[0].Name != "Current" {
t.Errorf("\ngot %#v\nwant Id=-1, Name=\"Current\"", m.Body.Threads)
// Also accept empty already-terminated response.
if len(m.Body.Threads) != 0 && (len(m.Body.Threads) != 1 || m.Body.Threads[0].Id != -1 || m.Body.Threads[0].Name != "Current") {
t.Errorf("\ngot %#v\nwant Id=-1, Name=\"Current\" or empty", m.Body.Threads)
}
case *dap.TerminatedEvent:
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册