[PATCH] D34623: [clang-format] Add a test for associative map proto buffer fields
This revision was automatically updated to reflect the committed changes. Closed by commit rL306386: [clang-format] Add a test for associative map proto buffer fields (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D34623 Files: cfe/trunk/unittests/Format/FormatTestProto.cpp Index: cfe/trunk/unittests/Format/FormatTestProto.cpp === --- cfe/trunk/unittests/Format/FormatTestProto.cpp +++ cfe/trunk/unittests/Format/FormatTestProto.cpp @@ -61,6 +61,29 @@ " really.really.long.qualified.type.aaa.aaa.\n" " another_field = 2;\n" "}"); + verifyFormat("message SomeMessage {\n" + " map projects = 1;\n" + " optional map size_projects = 2;\n" + " map\n" + " projects = 3;\n" + " map projects = 4;\n" + " map\n" + " projects = 5;\n" + " map\n" + " longlonglonglonglonglonglonglonglonglongonglon = 6;\n" + " map projects = 7;\n" + " map\n" + " releleallyreallyreallyreallyreallyreallyreallylongnam =\n" + " 8;\n" + " map projects = 9;\n" + "}"); } TEST_F(FormatTestProto, KeywordsInOtherLanguages) { Index: cfe/trunk/unittests/Format/FormatTestProto.cpp === --- cfe/trunk/unittests/Format/FormatTestProto.cpp +++ cfe/trunk/unittests/Format/FormatTestProto.cpp @@ -61,6 +61,29 @@ " really.really.long.qualified.type.aaa.aaa.\n" " another_field = 2;\n" "}"); + verifyFormat("message SomeMessage {\n" + " map projects = 1;\n" + " optional map size_projects = 2;\n" + " map\n" + " projects = 3;\n" + " map projects = 4;\n" + " map\n" + " projects = 5;\n" + " map\n" + " longlonglonglonglonglonglonglonglonglongonglon = 6;\n" + " map projects = 7;\n" + " map\n" + " releleallyreallyreallyreallyreallyreallyreallylongnam =\n" + " 8;\n" + " map projects = 9;\n" + "}"); } TEST_F(FormatTestProto, KeywordsInOtherLanguages) { ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D34623: [clang-format] Add a test for associative map proto buffer fields
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Thank you! https://reviews.llvm.org/D34623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D34623: [clang-format] Add a test for associative map proto buffer fields
krasimir updated this revision to Diff 103962. krasimir added a comment. - Add map declarations spanning multiple lines https://reviews.llvm.org/D34623 Files: unittests/Format/FormatTestProto.cpp Index: unittests/Format/FormatTestProto.cpp === --- unittests/Format/FormatTestProto.cpp +++ unittests/Format/FormatTestProto.cpp @@ -61,6 +61,29 @@ " really.really.long.qualified.type.aaa.aaa.\n" " another_field = 2;\n" "}"); + verifyFormat("message SomeMessage {\n" + " map projects = 1;\n" + " optional map size_projects = 2;\n" + " map\n" + " projects = 3;\n" + " map projects = 4;\n" + " map\n" + " projects = 5;\n" + " map\n" + " longlonglonglonglonglonglonglonglonglongonglon = 6;\n" + " map projects = 7;\n" + " map\n" + " releleallyreallyreallyreallyreallyreallyreallylongnam =\n" + " 8;\n" + " map projects = 9;\n" + "}"); } TEST_F(FormatTestProto, KeywordsInOtherLanguages) { Index: unittests/Format/FormatTestProto.cpp === --- unittests/Format/FormatTestProto.cpp +++ unittests/Format/FormatTestProto.cpp @@ -61,6 +61,29 @@ " really.really.long.qualified.type.aaa.aaa.\n" " another_field = 2;\n" "}"); + verifyFormat("message SomeMessage {\n" + " map projects = 1;\n" + " optional map size_projects = 2;\n" + " map\n" + " projects = 3;\n" + " map projects = 4;\n" + " map\n" + " projects = 5;\n" + " map\n" + " longlonglonglonglonglonglonglonglonglongonglon = 6;\n" + " map projects = 7;\n" + " map\n" + " releleallyreallyreallyreallyreallyreallyreallylongnam =\n" + " 8;\n" + " map projects = 9;\n" + "}"); } TEST_F(FormatTestProto, KeywordsInOtherLanguages) { ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D34623: [clang-format] Add a test for associative map proto buffer fields
djasper added a comment. Can you create a more interesting test case where the map definition spans multiple lines? Possibly use qualified names for the field types. https://reviews.llvm.org/D34623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits