summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2017-12-20 16:06:05 +0000
committerSam McCall <sam.mccall@gmail.com>2017-12-20 16:06:05 +0000
commitecb55af7afac66e639fa85982483925eb6a68ca3 (patch)
tree2c6b7e22ccfcc2a8bdfc8e50b55c38242de2bf8c /docs
parentd1ca8b929f50d952ca6d1650a61cef2b6d2cedf3 (diff)
[clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC
Summary: The goal here is again to make it easier to read and write the tests. I've extracted `parseTextMarker` from CodeCompleteTests into an `Annotations` class, adding features to it: - as well as points `^s` it allows ranges `[[...]]` - multiple points and ranges are supported - points and ranges may be named: `$name^` and `$name[[...]]` These features are used for the xrefs tests. This also paves the way for replacing the lit diagnostics.test with more readable unit tests, using named ranges. Alternative considered: `TestSelectionRange` in clang-refactor/TestSupport Main problems were: - delimiting the end of ranges is awkward, requiring counting - comment syntax is long and at least as cryptic for most cases - no separate syntax for point vs range, which keeps xrefs tests concise - Still need to convert to Position everywhere - Still need helpers for common case of expecting exactly one point/range (I'll probably promote the extra `PrintTo`s from some of the core Protocol types into `operator<<` in `Protocol.h` itself in a separate, prior patch...) Reviewers: ioeric Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41432 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@321184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions