forked from OSchip/llvm-project
Add additional test-case for one-line-function.
This ensures that we format: void longFunctionName { } // long comment here And not: void longFunctionName {} // long comment here As requested in post-commit-review. llvm-svn: 182024
This commit is contained in:
parent
47db66d43f
commit
9271650e61
|
@ -3066,6 +3066,9 @@ TEST_F(FormatTest, PullTrivialFunctionDefinitionsIntoSingleLine) {
|
|||
"}");
|
||||
verifyFormat("void f() {} // comment");
|
||||
verifyFormat("void f() { int a; } // comment");
|
||||
verifyFormat("void f() {\n"
|
||||
"} // comment",
|
||||
getLLVMStyleWithColumns(15));
|
||||
|
||||
verifyFormat("void f() { return 42; }", getLLVMStyleWithColumns(23));
|
||||
verifyFormat("void f() {\n return 42;\n}", getLLVMStyleWithColumns(22));
|
||||
|
|
Loading…
Reference in New Issue