File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
test/refactoring/ExpandSwitchCases
Outputs/partially_handled Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change
1
+ enum E {
2
+ case e1
3
+ case e2
4
+ case e3
5
+ case e4
6
+ }
7
+
8
+ func foo(e: E) -> Int {
9
+ switch e {
10
+ case .e1: return 5
11
+ case .e2: <#code#>
12
+ case .e3: <#code#>
13
+ case .e4: <#code#>
14
+ }
15
+ }
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ enum E {
6
6
}
7
7
8
8
func foo( e: E ) -> Int {
9
- switch e { }
9
+ switch e {
10
+ case . e1: return 5
11
+ }
10
12
}
11
13
// RUN: rm -rf %t.result && mkdir -p %t.result
12
- // RUN: %refactor -expand-switch-cases -source-filename %s -pos=9:8 >> %t.result/L10 .swift
13
- // RUN: diff -u %S/Outputs/partially_handled/L10 .swift.expected %t.result/L10 .swift
14
+ // RUN: %refactor -expand-switch-cases -source-filename %s -pos=9:8 >> %t.result/L11 .swift
15
+ // RUN: diff -u %S/Outputs/partially_handled/L11 .swift.expected %t.result/L11 .swift
You can’t perform that action at this time.
0 commit comments