aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/ConfigParseTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/ConfigParseTest.cpp')
-rw-r--r--clang/unittests/Format/ConfigParseTest.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/unittests/Format/ConfigParseTest.cpp b/clang/unittests/Format/ConfigParseTest.cpp
index 9abb8a1..318f08c 100644
--- a/clang/unittests/Format/ConfigParseTest.cpp
+++ b/clang/unittests/Format/ConfigParseTest.cpp
@@ -183,7 +183,6 @@ TEST(ConfigParseTest, ParsesConfigurationBools) {
CHECK_PARSE_BOOL(ObjCSpaceAfterProperty);
CHECK_PARSE_BOOL(ObjCSpaceBeforeProtocolList);
CHECK_PARSE_BOOL(Cpp11BracedListStyle);
- CHECK_PARSE_BOOL(ReflowComments);
CHECK_PARSE_BOOL(RemoveBracesLLVM);
CHECK_PARSE_BOOL(RemoveSemicolon);
CHECK_PARSE_BOOL(SkipMacroDefinitionBody);
@@ -381,6 +380,16 @@ TEST(ConfigParseTest, ParsesConfiguration) {
CHECK_PARSE("PointerBindsToType: Middle", PointerAlignment,
FormatStyle::PAS_Middle);
+ Style.ReflowComments = FormatStyle::RCS_Always;
+ CHECK_PARSE("ReflowComments: Never", ReflowComments, FormatStyle::RCS_Never);
+ CHECK_PARSE("ReflowComments: IndentOnly", ReflowComments,
+ FormatStyle::RCS_IndentOnly);
+ CHECK_PARSE("ReflowComments: Always", ReflowComments,
+ FormatStyle::RCS_Always);
+ // For backward compatibility:
+ CHECK_PARSE("ReflowComments: false", ReflowComments, FormatStyle::RCS_Never);
+ CHECK_PARSE("ReflowComments: true", ReflowComments, FormatStyle::RCS_Always);
+
Style.Standard = FormatStyle::LS_Auto;
CHECK_PARSE("Standard: c++03", Standard, FormatStyle::LS_Cpp03);
CHECK_PARSE("Standard: c++11", Standard, FormatStyle::LS_Cpp11);