Skip to content

Commit

Permalink
[Omit needless words] Fix testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
DougGregor committed Feb 9, 2016
1 parent 93d4e93 commit 98d8686
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/Sema/omit_needless_words.swift
Expand Up @@ -2,7 +2,7 @@

class C1 {
init(tasteString: String) { } // expected-warning{{'init(tasteString:)' could be named 'init(taste:)'}}{{8-8=taste }}
func processWithString(string: String, toInt: Int) { } // expected-warning{{'processWithString(_:toInt:)' could be named 'processWith(_:to:)'}}{{8-25=processWith}}{{42-42=to }}
func processWithString(string: String, toInt: Int) { } // expected-warning{{'processWithString(_:toInt:)' could be named 'process(withString:to:)'}}{{8-25=process}}{{42-42=to }}
func processWithInt(value: Int) { } // expected-warning{{'processWithInt' could be named 'processWith'}}{{8-22=processWith}}
}

Expand All @@ -13,7 +13,7 @@ extension String {

func callSites(s: String) {
let c1 = C1(tasteString: "blah") // expected-warning{{'init(tasteString:)' could be named 'init(taste:)'}}{{15-26=taste}}
c1.processWithString("a", toInt: 1) // expected-warning{{'processWithString(_:toInt:)' could be named 'processWith(_:to:)'}}{{6-23=processWith}}{{29-34=to}}
c1.processWithString("a", toInt: 1) // expected-warning{{'processWithString(_:toInt:)' could be named 'process(withString:to:)'}}{{6-23=process}}{{29-34=to}}
c1.processWithInt(5) // expected-warning{{'processWithInt' could be named 'processWith'}}{{6-20=processWith}}
_ = String.randomString // expected-warning{{'randomString' could be named 'random'}}{{14-26=random}}
_ = s.wonkycasedString // expected-warning{{'wonkycasedString' could be named 'wonkycased'}}{{9-25=wonkycased}}
Expand Down

0 comments on commit 98d8686

Please sign in to comment.