Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/regtest: fill out features of the new marker tests
Add missing features to the new marker test implementation, implement a few new markers, and port some tests to demonstrate the new structure. Additionally, improve UX following some experience working with these tests. Specifically: - Add support for settings.json. This was necessary for standard library hover, since full documentation was too verbose and varied across Go versions. - Ensure that the ordering of ordinary archive files is preserved. I kept having go.mod sorted below go files, which harms readability. - Add a helper to provide a nice location summary for test output, formatting both local and global (=archive-wide) positions. - Add support for both regexp and string locations conversion. - Add the loc marker, which is pre-processed to make named locations available to other markers. - Add the diag marker, which defines a 1:1 pairing between observed and expected diagnostics. - Add the def marker, which runs textDocument/definition. - Port around half of the godef tests, which include both def and hover markers. While doing so, try to extract related assertions into separate tests, to improve organization and documentation and reduce test size. Remaining tests will have to wait, as this CL was getting too big. For golang/go#54845 Change-Id: Id9fe22c00ebd1b3a96eeacc5c0e82fca9c95c680 Reviewed-on: https://go-review.googlesource.com/c/tools/+/465895 Run-TryBot: Robert Findley <[email protected]> Reviewed-by: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]> gopls-CI: kokoro <[email protected]>
- Loading branch information