diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-02-06 11:34:34 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-02-06 11:34:34 +0000 |
commit | a79d62d2f5a9dfbe5e5e406b3586080596c48313 (patch) | |
tree | 16b154ebca92b15cc374b14197d06e30612c5350 /clang/unittests/Format/FormatTestRawStrings.cpp | |
parent | ad48d2fe611f1431a0d6541bfc8fa5c977e2c943 (diff) | |
download | bcm5719-llvm-a79d62d2f5a9dfbe5e5e406b3586080596c48313.tar.gz bcm5719-llvm-a79d62d2f5a9dfbe5e5e406b3586080596c48313.zip |
[clang-format] Adds space around angle brackets in text protos
Summary:
This patch adds spaces around angle brackets in text proto Google style.
Previously these were detected as template openers and closers, which happened
to have the expected effect. Now we detect them as scope openers and closers
similarly to the way braces are handled in this context.
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D42727
llvm-svn: 324337
Diffstat (limited to 'clang/unittests/Format/FormatTestRawStrings.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestRawStrings.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/unittests/Format/FormatTestRawStrings.cpp b/clang/unittests/Format/FormatTestRawStrings.cpp index 4d1da977595..21bbc3fe6f6 100644 --- a/clang/unittests/Format/FormatTestRawStrings.cpp +++ b/clang/unittests/Format/FormatTestRawStrings.cpp @@ -186,7 +186,7 @@ TEST_F(FormatTestRawStrings, ReformatsShortRawStringsOnSingleLine) { R"test(P p = TP(R"pb(item_1:1 item_2:2)pb");)test", getRawStringPbStyleWithColumns(40))); expect_eq( - R"test(P p = TP(R"pb(item_1 <1> item_2: { 2 })pb");)test", + R"test(P p = TP(R"pb(item_1 < 1 > item_2: { 2 })pb");)test", format( R"test(P p = TP(R"pb(item_1<1> item_2:{2})pb");)test", getRawStringPbStyleWithColumns(40))); @@ -225,8 +225,8 @@ P p = TPPPPPPPPPPPPPPP(R"pb(item_1: 1, item_2: 2, item_3: 3)pb");)test", getRawStringPbStyleWithColumns(40))); expect_eq(R"test( -P p = TP(R"pb(item_1 <1> - item_2: <2> +P p = TP(R"pb(item_1 < 1 > + item_2: < 2 > item_3 {})pb");)test", format(R"test( P p = TP(R"pb(item_1<1> item_2:<2> item_3{ })pb");)test", @@ -245,9 +245,9 @@ P p = TP(R"pb(item_1: 1, item_2: 2, item_3: 3, item_4: 4)pb");)test", expect_eq(R"test( P p = TPPPPPPPPPPPPPPP( - R"pb(item_1 <1>, + R"pb(item_1 < 1 >, item_2: { 2 }, - item_3: <3>, + item_3: < 3 >, item_4: { 4 })pb");)test", format(R"test( P p = TPPPPPPPPPPPPPPP(R"pb(item_1<1>, item_2: {2}, item_3: <3>, item_4:{4})pb");)test", |