[PATCH] D45941: [Support/Path] Add more tests and improve failure messages of existing ones
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 23 02:48:34 PDT 2018
labath created this revision.
labath added reviewers: zturner, espindola.
I am preparing a patch to the path function. While working on it, I
noticed that some of the areas are lacking test coverage (e.g. filename
and parent_path functions), so I add more tests to guard against
regressions there.
I have also found the failure messages hard to understand, so I rewrote
some existing test to give more actionable messages when they fail:
- for tests which run over multiple inputs, I use SCOPED_TRACE, to show which of the inputs caused the actual failure.
- for comparisons of vectors, I use gmock's container matchers, which will print out the full container contents (and the elements that differ) when they fail to match.
Repository:
rL LLVM
https://reviews.llvm.org/D45941
Files:
unittests/Support/Path.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45941.143517.patch
Type: text/x-patch
Size: 9053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180423/a98f7e56/attachment.bin>
More information about the llvm-commits
mailing list