@@ -16419,6 +16419,37 @@ TEST_F(FormatTest, AlignWithLineBreaks) {
16419
16419
"}",
16420
16420
Style);
16421
16421
// clang-format on
16422
+
16423
+ Style = getLLVMStyleWithColumns(120);
16424
+ Style.AlignConsecutiveAssignments = FormatStyle::ACS_Consecutive;
16425
+ Style.ContinuationIndentWidth = 4;
16426
+ Style.IndentWidth = 4;
16427
+
16428
+ // clang-format off
16429
+ verifyFormat("void SomeFunc() {\n"
16430
+ " newWatcher.maxAgeUsec = ToLegacyTimestamp(GetMaxAge(FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec),\n"
16431
+ " seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));\n"
16432
+ " newWatcher.maxAge = ToLegacyTimestamp(GetMaxAge(FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec),\n"
16433
+ " seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));\n"
16434
+ " newWatcher.max = ToLegacyTimestamp(GetMaxAge(FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec),\n"
16435
+ " seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));\n"
16436
+ "}",
16437
+ Style);
16438
+ // clang-format on
16439
+
16440
+ Style.BinPackArguments = false;
16441
+
16442
+ // clang-format off
16443
+ verifyFormat("void SomeFunc() {\n"
16444
+ " newWatcher.maxAgeUsec = ToLegacyTimestamp(GetMaxAge(\n"
16445
+ " FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));\n"
16446
+ " newWatcher.maxAge = ToLegacyTimestamp(GetMaxAge(\n"
16447
+ " FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));\n"
16448
+ " newWatcher.max = ToLegacyTimestamp(GetMaxAge(\n"
16449
+ " FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));\n"
16450
+ "}",
16451
+ Style);
16452
+ // clang-format on
16422
16453
}
16423
16454
16424
16455
TEST_F(FormatTest, AlignWithInitializerPeriods) {
0 commit comments