summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index aef1dae6fdf..c30133a4b8a 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6242,5 +6242,14 @@ TEST_F(FormatTest, FormatsWithWebKitStyle) {
format("if (aaaaaaaaaaaaaaa || bbbbbbbbbbbbbbb) { i++; }", Style));
}
+TEST_F(FormatTest, FormatsProtocolBufferDefinitions) {
+ // It seems that clang-format can format protocol buffer definitions
+ // (see https://code.google.com/p/protobuf/).
+ verifyFormat("message SomeMessage {\n"
+ " required int32 field1 = 1;\n"
+ " optional string field2 = 2 [default = \"2\"]\n"
+ "}");
+}
+
} // end namespace tooling
} // end namespace clang
OpenPOWER on IntegriCloud