@@ -28321,12 +28321,10 @@ TEST_F(FormatTest, KeepFormFeed) {
2832128321}
2832228322
2832328323TEST_F(FormatTest, ShortNamespacesOption) {
28324- auto BaseStyle = getLLVMStyle();
28325- BaseStyle.AllowShortNamespacesOnASingleLine = true;
28326- BaseStyle.FixNamespaceComments = false;
28327- BaseStyle.CompactNamespaces = true;
28328-
28329- auto Style = BaseStyle;
28324+ auto Style = getLLVMStyle();
28325+ Style.AllowShortNamespacesOnASingleLine = true;
28326+ Style.CompactNamespaces = true;
28327+ Style.FixNamespaceComments = false;
2833028328
2833128329 // Basic functionality.
2833228330 verifyFormat("namespace foo { class bar; }", Style);
@@ -28358,7 +28356,7 @@ TEST_F(FormatTest, ShortNamespacesOption) {
2835828356 verifyFormat("namespace foo { namespace bar { class baz; } }", Style);
2835928357
2836028358 // Without CompactNamespaces, we won't merge consecutive namespace
28361- // declarations
28359+ // declarations.
2836228360 Style.CompactNamespaces = false;
2836328361 verifyFormat("namespace foo {\n"
2836428362 "namespace bar { class baz; }\n"
@@ -28371,7 +28369,7 @@ TEST_F(FormatTest, ShortNamespacesOption) {
2837128369 "}",
2837228370 Style);
2837328371
28374- Style = BaseStyle ;
28372+ Style.CompactNamespaces = true ;
2837528373
2837628374 // Varying inner content.
2837728375 verifyFormat("namespace foo {\n"
@@ -28419,9 +28417,7 @@ TEST_F(FormatTest, ShortNamespacesOption) {
2841928417 // too long to fit within the ColumnLimit, reducing the how likely the line
2842028418 // will still fit on a single line. The recommendation for now is to use the
2842128419 // concatenated namespace syntax instead. e.g. 'namespace foo::bar'
28422- Style = BaseStyle;
2842328420 Style.FixNamespaceComments = true;
28424-
2842528421 verifyFormat(
2842628422 "namespace foo { namespace bar { namespace baz {\n"
2842728423 "class qux;\n"
0 commit comments