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