Skip to content

Commit 5f68f29

Browse files
authored
Merge pull request swiftlang#189 from dylansturg/new_switch_test
Add a test case for stacking open-breaks.
2 parents 86d467f + a5a69e6 commit 5f68f29

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/SwiftFormatPrettyPrintTests/SwitchStmtTests.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ final class SwitchStmtTests: PrettyPrintTestCase {
8383
case "a": print("a")
8484
case "b", "c": print("bc")
8585
case "d", "e", "f", "g", "h": print("defgh")
86+
case someVeryLongVarName, someOtherLongVarName: foo(a: [1, 2, 3, 4, 5])
8687
default: print("default")
8788
}
8889
"""
@@ -96,6 +97,11 @@ final class SwitchStmtTests: PrettyPrintTestCase {
9697
case "d", "e", "f",
9798
"g", "h":
9899
print("defgh")
100+
case someVeryLongVarName,
101+
someOtherLongVarName:
102+
foo(a: [
103+
1, 2, 3, 4, 5,
104+
])
99105
default:
100106
print("default")
101107
}

0 commit comments

Comments
 (0)