[PATCH] D65525: [clangd] Add new helpers to make tweak tests scale better. Convert most tests. NFC

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 31 10:18:57 PDT 2019


sammccall created this revision.
sammccall added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, mgorny.
Herald added a project: clang.

TweakTests.cpp has some pretty good helpers added for the first few
tweaks, but they have some limitations:

- many assertion failures point at the wrong line
- need lots of input/output tests, setup code is duplicated across both
- local helpers make it hard to split the file as it grows

The new helpers in TweakTests.h are based on old ones (same operations)
but try to address these issues and generally make tests more terse
while improving error messages.

This patch converts everything except ExtractVariable (which is complex
and has changes in flight, so will be converted later).
It's LOC-neutral, despite not being able to get rid of the old helpers
until ExtractVariable is done.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65525

Files:
  clang-tools-extra/clangd/unittests/CMakeLists.txt
  clang-tools-extra/clangd/unittests/TweakTesting.cpp
  clang-tools-extra/clangd/unittests/TweakTesting.h
  clang-tools-extra/clangd/unittests/TweakTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65525.212620.patch
Type: text/x-patch
Size: 26746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190731/12da9587/attachment-0001.bin>


More information about the cfe-commits mailing list