Formatter: Add a test for bitfields.
They work fine, but this fifth use of colons (after labels, in ?:,
in initalizer lists in constructors, in objc method expressions, and in
bitfields) wasn't covered by tests yet.
llvm-svn: 172377
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index a8417f1..b05d19c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -369,6 +369,13 @@
"};");
}
+TEST_F(FormatTest, FormatsBitfields) {
+ verifyFormat("struct Bitfields {\n"
+ " unsigned sClass : 8;\n"
+ " unsigned ValueKind : 2;\n"
+ "};");
+}
+
TEST_F(FormatTest, FormatsNamespaces) {
verifyFormat("namespace some_namespace {\n"
"class A {};\n"