]> granicus.if.org Git - clang/commit
[clang-format] In tests, expected code should be format-stable
authorMark Zeren <mzeren@vmware.com>
Wed, 4 Apr 2018 21:09:00 +0000 (21:09 +0000)
committerMark Zeren <mzeren@vmware.com>
Wed, 4 Apr 2018 21:09:00 +0000 (21:09 +0000)
commit893efa76e2193b71b65b75a1ea2e3fb913a3db77
treea0026c587e81c0c6afcd9065892a3e3e1e485522
parentd905a6bc26925b7860cfd1db154571771459055e
[clang-format] In tests, expected code should be format-stable

Summary: Extend various verifyFormat helper functions to check that the
expected text is "stable". This provides some protection against bugs
where formatting results are ocilating between two forms, or continually
change in some other way.

Testing Done:

* Ran unit tests.

* Reproduced a known instability in preprocessor indentation which was
  caught by this new check.

Reviewers: krasimir

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D42034

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329231 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/Format/FormatTest.cpp
unittests/Format/FormatTestComments.cpp
unittests/Format/FormatTestJS.cpp
unittests/Format/FormatTestJava.cpp
unittests/Format/FormatTestObjC.cpp
unittests/Format/FormatTestProto.cpp
unittests/Format/FormatTestTextProto.cpp