[PATCH] D42034: [clang-format] In tests, expected code should be format-stable

Mark Zeren via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 07:24:48 PST 2018


mzeren-vmw updated this revision to Diff 132395.
mzeren-vmw added a comment.

- Reviewers: drop euhlmann, add djasper
- Rebase
- Ping


Repository:
  rC Clang

https://reviews.llvm.org/D42034

Files:
  unittests/Format/FormatTest.cpp


Index: unittests/Format/FormatTest.cpp
===================================================================
--- unittests/Format/FormatTest.cpp
+++ unittests/Format/FormatTest.cpp
@@ -72,6 +72,7 @@
 
   void verifyFormat(llvm::StringRef Expected, llvm::StringRef Code,
                     const FormatStyle &Style = getLLVMStyle()) {
+    EXPECT_EQ(Expected.str(), format(Expected, Style));
     EXPECT_EQ(Expected.str(), format(Code, Style));
     if (Style.Language == FormatStyle::LK_Cpp) {
       // Objective-C++ is a superset of C++, so everything checked for C++


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42034.132395.patch
Type: text/x-patch
Size: 570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180201/1d718ae7/attachment.bin>


More information about the cfe-commits mailing list