-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8de7d27
commit d7b9bba
Showing
6 changed files
with
326 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
test-resources/swift/cleanup_rules/expected/TestEnum.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
enum TestFlag { | ||
case stale_flag_two | ||
case stale_flag_three | ||
|
||
var var1: String { | ||
switch self { | ||
case .stale_flag_two, .stale_flag_three: | ||
return "test" | ||
} | ||
} | ||
|
||
var var2: String { | ||
switch self { | ||
case .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
} | ||
|
||
enum TestFlag2 { | ||
case stale_flag_two | ||
case stale_flag_three | ||
|
||
var var1: String { | ||
switch self { | ||
case .stale_flag_two, .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
|
||
var var2: String { | ||
switch self { | ||
case .stale_flag_two, .stale_flag_three: | ||
return "test" | ||
} | ||
} | ||
} | ||
|
||
enum TestFlag3 { | ||
case stale_flag_two | ||
case stale_flag_three | ||
|
||
var var1: String { | ||
switch self { | ||
case .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
|
||
var var2: String { | ||
switch self { | ||
case .stale_flag_two, .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
} | ||
|
||
|
||
enum TestFlag4 { | ||
case stale_flag_two | ||
case stale_flag_three | ||
|
||
var var1: String { | ||
switch self { | ||
case .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
|
||
var var2: String { | ||
switch self { | ||
case .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
|
||
var var3: String { | ||
switch self { | ||
case .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
enum TestFlag { | ||
case stale_flag_one | ||
case stale_flag_two | ||
case stale_flag_three | ||
|
||
var var1: String { | ||
switch self { | ||
case .stale_flag_two, .stale_flag_one, .stale_flag_three: | ||
return "test" | ||
} | ||
} | ||
|
||
var var2: String { | ||
switch self { | ||
case .stale_flag_one, .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
} | ||
|
||
enum TestFlag2 { | ||
case stale_flag_one | ||
case stale_flag_two | ||
case stale_flag_three | ||
|
||
var var1: String { | ||
switch self { | ||
case .stale_flag_two, .stale_flag_three, .stale_flag_one: | ||
return "test" | ||
} | ||
} | ||
|
||
var var2: String { | ||
switch self { | ||
case .stale_flag_two, .stale_flag_one, .stale_flag_three: | ||
return "test" | ||
} | ||
} | ||
} | ||
|
||
enum TestFlag3 { | ||
case stale_flag_one | ||
case stale_flag_two | ||
case stale_flag_three | ||
|
||
var var1: String { | ||
switch self { | ||
case .stale_flag_one, .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
|
||
var var2: String { | ||
switch self { | ||
case .stale_flag_two, .stale_flag_three, .stale_flag_one: | ||
return "test" | ||
} | ||
} | ||
} | ||
|
||
|
||
enum TestFlag4 { | ||
case stale_flag_one | ||
case stale_flag_two | ||
case stale_flag_three | ||
|
||
var var1: String { | ||
switch self { | ||
case .stale_flag_one: | ||
return "test2" | ||
case .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
|
||
var var2: String { | ||
switch self { | ||
case .stale_flag_one: | ||
return "test2" | ||
case .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
|
||
var var3: String { | ||
switch self { | ||
case .stale_flag_one: | ||
return "test2" | ||
case .stale_flag_three, .stale_flag_two: | ||
return "test" | ||
} | ||
} | ||
} |