[cfe-commits] r171751 - /cfe/trunk/unittests/Format/FormatTest.cpp

Nico Weber nicolasweber at gmx.de
Mon Jan 7 07:56:25 PST 2013


Author: nico
Date: Mon Jan  7 09:56:25 2013
New Revision: 171751

URL: http://llvm.org/viewvc/llvm-project?rev=171751&view=rev
Log:
Slightly expand the @ test to cover whitespace between @ and keyword.

Modified:
    cfe/trunk/unittests/Format/FormatTest.cpp

Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=171751&r1=171750&r2=171751&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Mon Jan  7 09:56:25 2013
@@ -1021,9 +1021,14 @@
           "outRange8:(NSRange) out_range8  outRange9:(NSRange) out_range9;"));
 }
 
-TEST_F(FormatTest, DoNotDropAt) {
+TEST_F(FormatTest, ObjCAt) {
   verifyFormat("@interface");
   verifyFormat("@dynamic");
+  EXPECT_EQ("@interface", format("@ interface"));
+
+  // The precise formatting of this doesn't matter, nobody writes code like
+  // this.
+  verifyFormat("@ /*foo*/ interface");
 }
 
 } // end namespace tooling





More information about the cfe-commits mailing list