diff options
Diffstat (limited to 'clang/unittests')
-rw-r--r-- | clang/unittests/Format/ConfigParseTest.cpp | 8 | ||||
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 15 |
2 files changed, 5 insertions, 18 deletions
diff --git a/clang/unittests/Format/ConfigParseTest.cpp b/clang/unittests/Format/ConfigParseTest.cpp index 2466677a..aded3ed 100644 --- a/clang/unittests/Format/ConfigParseTest.cpp +++ b/clang/unittests/Format/ConfigParseTest.cpp @@ -178,9 +178,8 @@ TEST(ConfigParseTest, ParsesConfigurationBools) { CHECK_PARSE_BOOL(IndentWrappedFunctionNames); CHECK_PARSE_BOOL(InsertBraces); CHECK_PARSE_BOOL(InsertNewlineAtEOF); - CHECK_PARSE_BOOL_FIELD(KeepEmptyLines.AtEndOfFile, "KeepEmptyLinesAtEOF"); - CHECK_PARSE_BOOL_FIELD(KeepEmptyLines.AtStartOfBlock, - "KeepEmptyLinesAtTheStartOfBlocks"); + CHECK_PARSE_BOOL(KeepEmptyLinesAtEOF); + CHECK_PARSE_BOOL(KeepEmptyLinesAtTheStartOfBlocks); CHECK_PARSE_BOOL(ObjCSpaceAfterProperty); CHECK_PARSE_BOOL(ObjCSpaceBeforeProtocolList); CHECK_PARSE_BOOL(Cpp11BracedListStyle); @@ -227,9 +226,6 @@ TEST(ConfigParseTest, ParsesConfigurationBools) { CHECK_PARSE_NESTED_BOOL(BraceWrapping, SplitEmptyFunction); CHECK_PARSE_NESTED_BOOL(BraceWrapping, SplitEmptyRecord); CHECK_PARSE_NESTED_BOOL(BraceWrapping, SplitEmptyNamespace); - CHECK_PARSE_NESTED_BOOL(KeepEmptyLines, AtEndOfFile); - CHECK_PARSE_NESTED_BOOL(KeepEmptyLines, AtStartOfBlock); - CHECK_PARSE_NESTED_BOOL(KeepEmptyLines, AtStartOfFile); CHECK_PARSE_NESTED_BOOL(SpaceBeforeParensOptions, AfterControlStatements); CHECK_PARSE_NESTED_BOOL(SpaceBeforeParensOptions, AfterForeachMacros); CHECK_PARSE_NESTED_BOOL(SpaceBeforeParensOptions, diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 5276e79..db1decb 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -45,10 +45,6 @@ TEST_F(FormatTest, FormatsGlobalStatementsAt0) { verifyFormat("\nint i;", " \n\t \v \f int i;"); verifyFormat("int i;\nint j;", " int i; int j;"); verifyFormat("int i;\nint j;", " int i;\n int j;"); - - auto Style = getLLVMStyle(); - Style.KeepEmptyLines.AtStartOfFile = false; - verifyFormat("int i;", " \n\t \v \f int i;", Style); } TEST_F(FormatTest, FormatsUnwrappedLinesAtFirstFormat) { @@ -167,7 +163,7 @@ TEST_F(FormatTest, RemovesEmptyLines) { auto CustomStyle = getLLVMStyle(); CustomStyle.BreakBeforeBraces = FormatStyle::BS_Custom; CustomStyle.BraceWrapping.AfterNamespace = true; - CustomStyle.KeepEmptyLines.AtStartOfBlock = false; + CustomStyle.KeepEmptyLinesAtTheStartOfBlocks = false; verifyFormat("namespace N\n" "{\n" "\n" @@ -393,7 +389,7 @@ TEST_F(FormatTest, RemovesEmptyLines) { Style.BreakBeforeBraces = FormatStyle::BS_Custom; Style.BraceWrapping.AfterClass = true; Style.BraceWrapping.AfterFunction = true; - Style.KeepEmptyLines.AtStartOfBlock = false; + Style.KeepEmptyLinesAtTheStartOfBlocks = false; verifyFormat("class Foo\n" "{\n" @@ -21960,11 +21956,6 @@ TEST_F(FormatTest, HandlesUTF8BOM) { verifyFormat("\xef\xbb\xbf"); verifyFormat("\xef\xbb\xbf#include <iostream>"); verifyFormat("\xef\xbb\xbf\n#include <iostream>"); - - auto Style = getLLVMStyle(); - Style.KeepEmptyLines.AtStartOfFile = false; - verifyFormat("\xef\xbb\xbf#include <iostream>", - "\xef\xbb\xbf\n#include <iostream>", Style); } // FIXME: Encode Cyrillic and CJK characters below to appease MS compilers. @@ -27239,7 +27230,7 @@ TEST_F(FormatTest, InsertNewlineAtEOF) { TEST_F(FormatTest, KeepEmptyLinesAtEOF) { FormatStyle Style = getLLVMStyle(); - Style.KeepEmptyLines.AtEndOfFile = true; + Style.KeepEmptyLinesAtEOF = true; const StringRef Code{"int i;\n\n"}; verifyNoChange(Code, Style); |