@@ -15125,7 +15125,7 @@ TEST_F(FormatTest, CustomShortFunctionOptions) {
1512515125 CustomEmpty.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Custom;
1512615126 CustomEmpty.AllowShortFunctionsOnASingleLineOptions.Empty = true;
1512715127 CustomEmpty.AllowShortFunctionsOnASingleLineOptions.Inline = false;
15128- CustomEmpty.AllowShortFunctionsOnASingleLineOptions.All = false;
15128+ CustomEmpty.AllowShortFunctionsOnASingleLineOptions.Other = false;
1512915129
1513015130 // Empty functions should be on a single line
1513115131 verifyFormat("int f() {}", CustomEmpty);
@@ -15146,6 +15146,9 @@ TEST_F(FormatTest, CustomShortFunctionOptions) {
1514615146 "};",
1514715147 CustomEmpty);
1514815148
15149+ // test with comment
15150+ verifyFormat("void f3() { /* comment */ }", CustomEmpty);
15151+
1514915152 // Test with AfterFunction = true
1515015153 CustomEmpty.BreakBeforeBraces = FormatStyle::BS_Custom;
1515115154 CustomEmpty.BraceWrapping.AfterFunction = true;
@@ -15161,7 +15164,7 @@ TEST_F(FormatTest, CustomShortFunctionOptions) {
1516115164 CustomInline.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Custom;
1516215165 CustomInline.AllowShortFunctionsOnASingleLineOptions.Empty = false;
1516315166 CustomInline.AllowShortFunctionsOnASingleLineOptions.Inline = true;
15164- CustomInline.AllowShortFunctionsOnASingleLineOptions.All = false;
15167+ CustomInline.AllowShortFunctionsOnASingleLineOptions.Other = false;
1516515168
1516615169 verifyFormat("class C {\n"
1516715170 " int f() {}\n"
@@ -15188,7 +15191,7 @@ TEST_F(FormatTest, CustomShortFunctionOptions) {
1518815191 CustomAll.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Custom;
1518915192 CustomAll.AllowShortFunctionsOnASingleLineOptions.Empty = false;
1519015193 CustomAll.AllowShortFunctionsOnASingleLineOptions.Inline = false;
15191- CustomAll.AllowShortFunctionsOnASingleLineOptions.All = true;
15194+ CustomAll.AllowShortFunctionsOnASingleLineOptions.Other = true;
1519215195
1519315196 // All functions should be on a single line if they fit
1519415197 verifyFormat("int f() { return 42; }", CustomAll);
@@ -15209,7 +15212,7 @@ TEST_F(FormatTest, CustomShortFunctionOptions) {
1520915212 CustomMixed.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Custom;
1521015213 CustomMixed.AllowShortFunctionsOnASingleLineOptions.Empty = true;
1521115214 CustomMixed.AllowShortFunctionsOnASingleLineOptions.Inline = true;
15212- CustomMixed.AllowShortFunctionsOnASingleLineOptions.All = false;
15215+ CustomMixed.AllowShortFunctionsOnASingleLineOptions.Other = false;
1521315216
1521415217 // Empty functions should be on a single line
1521515218 verifyFormat("int f() {}", CustomMixed);
0 commit comments