r292604 - [clang-format] Remove redundant test in style-on-command-line.cpp

Krasimir Georgiev via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 20 04:39:06 PST 2017


Author: krasimir
Date: Fri Jan 20 06:39:05 2017
New Revision: 292604

URL: http://llvm.org/viewvc/llvm-project?rev=292604&view=rev
Log:
[clang-format] Remove redundant test in style-on-command-line.cpp

Summary:
rL292562 added a fix to always format if the fallback style is set to "none".
In test/Format/style-on-command-line.cpp:19 is redundant, since -fallback-style
has a default value of LLVM set in ClangFormat.cpp:72.

@amaiorano: I believe that the rest of the test cases still cover your change in
case the fallback style is explicitly set to "none". Please, if this is not the
case, initiate a discussion.

Reviewers: ioeric, bkramer

Reviewed By: ioeric

Subscribers: cfe-commits, klimek, amaiorano

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

Modified:
    cfe/trunk/test/Format/style-on-command-line.cpp

Modified: cfe/trunk/test/Format/style-on-command-line.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/style-on-command-line.cpp?rev=292604&r1=292603&r2=292604&view=diff
==============================================================================
--- cfe/trunk/test/Format/style-on-command-line.cpp (original)
+++ cfe/trunk/test/Format/style-on-command-line.cpp Fri Jan 20 06:39:05 2017
@@ -16,15 +16,13 @@
 // RUN: rm %T/_clang-format
 // Test no config file found, WebKit fallback style is applied
 // RUN: clang-format -style=file -fallback-style=WebKit -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK10 %s
-// Test no config file and no fallback style, LLVM style is applied
-// RUN: clang-format -style=file -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK11 %s
 // Test no config file and fallback style "none", no formatting is applied
-// RUN: clang-format -style=file -fallback-style=none -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK12 %s
+// RUN: clang-format -style=file -fallback-style=none -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK11 %s
 // Test config file with no based style, and fallback style "none", formatting is applied
 // RUN: printf "IndentWidth: 6\n" > %T/_clang-format
-// RUN: clang-format -style=file -fallback-style=none -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK13 %s
+// RUN: clang-format -style=file -fallback-style=none -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK12 %s
 // Test yaml with no based style, and fallback style "none", LLVM formatting applied
-// RUN: clang-format -style="{IndentWidth: 7}" -fallback-style=none %s | FileCheck -strict-whitespace -check-prefix=CHECK14 %s
+// RUN: clang-format -style="{IndentWidth: 7}" -fallback-style=none %s | FileCheck -strict-whitespace -check-prefix=CHECK13 %s
 
 void f() {
 // CHECK1: {{^        int\* i;$}}
@@ -38,10 +36,9 @@ void f() {
 // CHECK8: {{^  int\* i;$}}
 // CHECK9: {{^    int \*i;$}}
 // CHECK10: {{^    int\* i;$}}
-// CHECK11: {{^  int \*i;$}}
-// CHECK12: {{^int\*i;$}}
-// CHECK13: {{^      int \*i;$}}
-// CHECK14: {{^       int \*i;$}}
+// CHECK11: {{^int\*i;$}}
+// CHECK12: {{^      int \*i;$}}
+// CHECK13: {{^       int \*i;$}}
 int*i;
 int j;
 }




More information about the cfe-commits mailing list