File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -3270,6 +3270,9 @@ struct FormatStyle {
32703270 Hex == R.Hex && HexMinDigits == R.HexMinDigits &&
32713271 HexMaxDigitsNoSeparator == R.HexMaxDigitsNoSeparator ;
32723272 }
3273+ bool operator !=(const IntegerLiteralSeparatorStyle &R) const {
3274+ return !operator ==(R);
3275+ }
32733276 };
32743277
32753278 // / Format integer literal separators (``'`` for C++ and ``_`` for C#, Java,
Original file line number Diff line number Diff line change @@ -1150,6 +1150,28 @@ TEST(ConfigParseTest, ParsesConfiguration) {
11501150 FormatStyle::BLS_Block);
11511151 CHECK_PARSE (" Cpp11BracedListStyle: true" , Cpp11BracedListStyle,
11521152 FormatStyle::BLS_AlignFirstComment);
1153+
1154+ const FormatStyle::IntegerLiteralSeparatorStyle
1155+ ExpectedIntegerLiteralSeparatorStyle{/* Binary=*/ 2 ,
1156+ /* BinaryMinDigit=*/ 5 ,
1157+ /* BinaryMaxDigitNoSeparator=*/ 2 ,
1158+ /* Decimal=*/ 6 ,
1159+ /* DecimalMinDigit=*/ 6 ,
1160+ /* DecimalMaxDigitNoSeparator=*/ 3 ,
1161+ /* Hex=*/ 4 ,
1162+ /* HexMinDigit=*/ 2 ,
1163+ /* HexMaxDigitNoSeparator=*/ 1 };
1164+ CHECK_PARSE (" IntegerLiteralSeparator:\n "
1165+ " Binary: 2\n "
1166+ " BinaryMinDigits: 5\n "
1167+ " BinaryMaxDigitsNoSeparator: 2\n "
1168+ " Decimal: 6\n "
1169+ " DecimalMinDigits: 6\n "
1170+ " DecimalMaxDigitsNoSeparator: 3\n "
1171+ " Hex: 4\n "
1172+ " HexMinDigits: 2\n "
1173+ " HexMaxDigitsNoSeparator: 1" ,
1174+ IntegerLiteralSeparator, ExpectedIntegerLiteralSeparatorStyle);
11531175}
11541176
11551177TEST (ConfigParseTest, ParsesConfigurationWithLanguages) {
You can’t perform that action at this time.
0 commit comments