r333092 - [clang-format] fix buildbots after r333085
Krasimir Georgiev via cfe-commits
cfe-commits at lists.llvm.org
Wed May 23 08:21:33 PDT 2018
Author: krasimir
Date: Wed May 23 08:21:33 2018
New Revision: 333092
URL: http://llvm.org/viewvc/llvm-project?rev=333092&view=rev
Log:
[clang-format] fix buildbots after r333085
Old gcc versions don't like raw string literals in macros.
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=333092&r1=333091&r2=333092&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Wed May 23 08:21:33 2018
@@ -5524,53 +5524,52 @@ TEST_F(FormatTest, WrapsTemplateDeclarat
TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) {
FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp);
Style.ColumnLimit = 60;
- EXPECT_EQ(R"test(
-// Baseline - no comments.
-template <
- typename aaaaaaaaaaaaaaaaaaaaaa<bbbbbbbbbbbb>::value>
-void f() {})test",
- format(R"test(
-// Baseline - no comments.
-template <
- typename aaaaaaaaaaaaaaaaaaaaaa<bbbbbbbbbbbb>::value>
-void f() {})test", Style));
+ EXPECT_EQ("// Baseline - no comments.\n"
+ "template <\n"
+ " typename aaaaaaaaaaaaaaaaaaaaaa<bbbbbbbbbbbb>::value>\n"
+ "void f() {}",
+ format("// Baseline - no comments.\n"
+ "template <\n"
+ " typename aaaaaaaaaaaaaaaaaaaaaa<bbbbbbbbbbbb>::value>\n"
+ "void f() {}",
+ Style));
- EXPECT_EQ(R"test(
-template <
- typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing
-void f() {})test",
- format(R"test(
-template <
- typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing
-void f() {})test", Style));
+ EXPECT_EQ("template <\n"
+ " typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing\n"
+ "void f() {}",
+ format("template <\n"
+ " typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing\n"
+ "void f() {}",
+ Style));
- EXPECT_EQ(R"test(
-template <
- typename aaaaaaaaaa<bbbbbbbbbbbb>::value> /* line */
-void f() {})test",
- format(R"test(
-template <typename aaaaaaaaaa<bbbbbbbbbbbb>::value> /* line */
-void f() {})test", Style));
+ EXPECT_EQ(
+ "template <\n"
+ " typename aaaaaaaaaa<bbbbbbbbbbbb>::value> /* line */\n"
+ "void f() {}",
+ format("template <typename aaaaaaaaaa<bbbbbbbbbbbb>::value> /* line */\n"
+ "void f() {}",
+ Style));
- EXPECT_EQ(R"test(
-template <
- typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing
- // multiline
-void f() {})test",
- format(R"test(
-template <
- typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing
- // multiline
-void f() {})test", Style));
+ EXPECT_EQ(
+ "template <\n"
+ " typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing\n"
+ " // multiline\n"
+ "void f() {}",
+ format("template <\n"
+ " typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing\n"
+ " // multiline\n"
+ "void f() {}",
+ Style));
- EXPECT_EQ(R"test(
-template <typename aaaaaaaaaa<
- bbbbbbbbbbbb>::value> // trailing loooong
-void f() {})test",
- format(R"test(
-template <
- typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing loooong
-void f() {})test", Style));
+ EXPECT_EQ(
+ "template <typename aaaaaaaaaa<\n"
+ " bbbbbbbbbbbb>::value> // trailing loooong\n"
+ "void f() {}",
+ format(
+ "template <\n"
+ " typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing loooong\n"
+ "void f() {}",
+ Style));
}
TEST_F(FormatTest, WrapsTemplateParameters) {
More information about the cfe-commits
mailing list