]> granicus.if.org Git - clang/commitdiff
[clang-format] fix buildbots after r333085
authorKrasimir Georgiev <krasimir@google.com>
Wed, 23 May 2018 15:21:33 +0000 (15:21 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Wed, 23 May 2018 15:21:33 +0000 (15:21 +0000)
Old gcc versions don't like raw string literals in macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333092 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Format/FormatTest.cpp

index 87e88200bb99366c370634927c72cb986c3b1755..73c1a2d4900b950726bd623945f0f41b23059920 100644 (file)
@@ -5524,53 +5524,52 @@ TEST_F(FormatTest, WrapsTemplateDeclarations) {
 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(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(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(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(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("// 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("template <\n"
+            "    typename aaaaaaaaaa<bbbbbbbbbbbb>::value>  // trailing\n"
+            "void f() {}",
+            format("template <\n"
+                   "    typename aaaaaaaaaa<bbbbbbbbbbbb>::value> // trailing\n"
+                   "void f() {}",
+                   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(
+      "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(
+      "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) {