djasper requested changes to this revision.
djasper added a comment.
This revision now requires changes to proceed.

So, while it might be convenient to view this all in one file, a test here is 
not convenient for me (or presumably other clang-format developers) to work 
with. You can make a pretty much 1:1 copy of it using a raw string literal in 
unittests. However, I don't think this is actually a good idea.

Over the years of working on clang-format we have discovered that you really 
need unittests and try to make them as specific about what you are trying to 
test as possible. There are many things in you patch, where you test really 
complex expressions that:

- I can envision arbitrary other changes to formatting that you wouldn't care 
about.
- Are much harder to debug for the specific issue than necessary, i.e. if 
something breaks, I'd have to reduce the test case further.

In general, I think this test adds very little on top of unittests we have for 
each single thing you configure in Mozilla style. I think the value added is 
that the combination of style flags used for Mozilla does work. But for that, 
really create a unittest that tests all the aspects of Mozilla style you care 
about with individual verifyFormat.. statements.


https://reviews.llvm.org/D30111



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to