r174816 - Formatter: Add test for default arguments.
Nico Weber
nicolasweber at gmx.de
Sat Feb 9 10:02:07 PST 2013
Author: nico
Date: Sat Feb 9 12:02:07 2013
New Revision: 174816
URL: http://llvm.org/viewvc/llvm-project?rev=174816&view=rev
Log:
Formatter: Add test for default arguments.
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=174816&r1=174815&r2=174816&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Sat Feb 9 12:02:07 2013
@@ -1687,6 +1687,8 @@ TEST_F(FormatTest, FormatsCasts) {
verifyFormat("void f(SmallVector<int>) {}");
verifyFormat("void f(SmallVector<int>);");
verifyFormat("void f(SmallVector<int>) = 0;");
+ verifyFormat("void f(int i = (kValue) * kMask) {}");
+ verifyFormat("void f(int i = (kA * kB) & kMask) {}");
}
TEST_F(FormatTest, FormatsFunctionTypes) {
More information about the cfe-commits
mailing list