Skip to content

Commit

Permalink
[clang-format][tests] Explicitly specify style in some tests
Browse files Browse the repository at this point in the history
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

llvm-svn: 365909
  • Loading branch information
Rafael Stahl committed Jul 12, 2019
1 parent 6f4fb4e commit f625a8a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clang/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() {
Expand Down
2 changes: 1 addition & 1 deletion clang/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

Expand Down
4 changes: 2 additions & 2 deletions clang/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;$}}
Expand Down
2 changes: 1 addition & 1 deletion clang/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
Expand Down

0 comments on commit f625a8a

Please sign in to comment.