Commit Graph

3 Commits

Author SHA1 Message Date
polinasok
680bc9a78d
service/dap: test refactoring (#2508)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-05-26 08:15:39 -07:00
Hyang-Ah Hana Kim
66782f9b27
daptest/gen: use %#v instead of %q (#2478)
Messages don't look good with %q.
2021-05-12 19:58:38 -07:00
Hyang-Ah Hana Kim
4b4f7a589a
daptest/gen: autogenerate some assertion functions (#2441)
daptest has type assertion functions that panic
if the read response/event message is not
the expected type. This is not only against the
recommended style guideline (Don't Panic, Useful
Test Failures, ...), but also it prevents from
quickly diagnosing test failures occurred in remote
CIs.

This PR changes the type assertion to the two
return value type assertion, and t.Fatal with details
if the type is not expected.
service/dap/daptest/main.go is a program that auto
generates those assertion functions in resp.go.

Run `go generate` from the service/dap directory
to update resp.go.
2021-05-06 11:11:45 +02:00