[PATCH] D61001: [clang-format][tests] Explicitly specify style in some tests

Rafael Stahl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 04:45:58 PDT 2019


r.stahl created this revision.
r.stahl added reviewers: djasper, klimek.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style.


Repository:
  rC Clang

https://reviews.llvm.org/D61001

Files:
  test/Format/adjust-indent.cpp
  test/Format/disable-include-sorting.cpp
  test/Format/language-detection.cpp
  test/Format/xmloutput.cpp


Index: test/Format/xmloutput.cpp
===================================================================
--- test/Format/xmloutput.cpp
+++ test/Format/xmloutput.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-format -output-replacements-xml -sort-includes %s \
+// RUN: clang-format -style=LLVM -output-replacements-xml -sort-includes %s \
 // RUN:   | FileCheck -strict-whitespace %s
 
 // CHECK: <?xml
Index: test/Format/language-detection.cpp
===================================================================
--- test/Format/language-detection.cpp
+++ test/Format/language-detection.cpp
@@ -1,8 +1,8 @@
 // RUN: grep -Ev "// *[A-Z0-9_]+:" %s \
-// RUN:   | clang-format -style=llvm -assume-filename=foo.js \
+// RUN:   | clang-format -style=LLVM -assume-filename=foo.js \
 // RUN:   | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
 // RUN: grep -Ev "// *[A-Z0-9_]+:" %s \
-// RUN:   | clang-format -style=llvm -assume-filename=foo.cpp \
+// RUN:   | clang-format -style=LLVM -assume-filename=foo.cpp \
 // RUN:   | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
 // CHECK1: {{^a >>>= b;$}}
 // CHECK2: {{^a >> >= b;$}}
Index: test/Format/disable-include-sorting.cpp
===================================================================
--- test/Format/disable-include-sorting.cpp
+++ test/Format/disable-include-sorting.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-format %s | FileCheck %s
+// RUN: clang-format %s -style=LLVM | FileCheck %s
 // RUN: clang-format %s -sort-includes -style="{SortIncludes: false}" | FileCheck %s
 // RUN: clang-format %s -sort-includes=false | FileCheck %s -check-prefix=NOT-SORTED
 
Index: test/Format/adjust-indent.cpp
===================================================================
--- test/Format/adjust-indent.cpp
+++ test/Format/adjust-indent.cpp
@@ -1,4 +1,4 @@
-// RUN: grep -Ev "// *[A-Z-]+:" %s | clang-format -lines=2:2 \
+// RUN: grep -Ev "// *[A-Z-]+:" %s | clang-format -style=LLVM -lines=2:2 \
 // RUN:   | FileCheck -strict-whitespace %s
 
 void  f() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61001.196212.patch
Type: text/x-patch
Size: 1994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190423/fe0b3872/attachment.bin>


More information about the cfe-commits mailing list