r365909 - [clang-format][tests] Explicitly specify style in some tests

Rafael Stahl via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 12 08:56:18 PDT 2019


Author: r.stahl
Date: Fri Jul 12 08:56:18 2019
New Revision: 365909

URL: http://llvm.org/viewvc/llvm-project?rev=365909&view=rev
Log:
[clang-format][tests] Explicitly specify style in some tests

Summary: 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.

Reviewers: djasper, klimek, MyDeveloperDay, krasimir

Reviewed By: MyDeveloperDay

Subscribers: lebedev.ri, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61001

Modified:
    cfe/trunk/test/Format/adjust-indent.cpp
    cfe/trunk/test/Format/disable-include-sorting.cpp
    cfe/trunk/test/Format/language-detection.cpp
    cfe/trunk/test/Format/xmloutput.cpp

Modified: cfe/trunk/test/Format/adjust-indent.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/adjust-indent.cpp?rev=365909&r1=365908&r2=365909&view=diff
==============================================================================
--- cfe/trunk/test/Format/adjust-indent.cpp (original)
+++ cfe/trunk/test/Format/adjust-indent.cpp Fri Jul 12 08:56:18 2019
@@ -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() {

Modified: cfe/trunk/test/Format/disable-include-sorting.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/disable-include-sorting.cpp?rev=365909&r1=365908&r2=365909&view=diff
==============================================================================
--- cfe/trunk/test/Format/disable-include-sorting.cpp (original)
+++ cfe/trunk/test/Format/disable-include-sorting.cpp Fri Jul 12 08:56:18 2019
@@ -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
 

Modified: cfe/trunk/test/Format/language-detection.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/language-detection.cpp?rev=365909&r1=365908&r2=365909&view=diff
==============================================================================
--- cfe/trunk/test/Format/language-detection.cpp (original)
+++ cfe/trunk/test/Format/language-detection.cpp Fri Jul 12 08:56:18 2019
@@ -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;$}}

Modified: cfe/trunk/test/Format/xmloutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/xmloutput.cpp?rev=365909&r1=365908&r2=365909&view=diff
==============================================================================
--- cfe/trunk/test/Format/xmloutput.cpp (original)
+++ cfe/trunk/test/Format/xmloutput.cpp Fri Jul 12 08:56:18 2019
@@ -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




More information about the cfe-commits mailing list