Fix warnings.

This commit is contained in:
Tadeas Kriz 2017-11-09 16:05:28 +01:00
parent 96ebbbf9ca
commit 3adcde2fc0
3 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ public struct ConcreteStubCall<IN>: StubCall {
} else {
// If only one parameter add brackets and quotes
let wrappedParameter = String(describing: (parameters, 0))
return wrappedParameter[..<wrappedParameter.characters.index(wrappedParameter.endIndex, offsetBy: -4)] + ")"
return wrappedParameter[..<wrappedParameter.index(wrappedParameter.endIndex, offsetBy: -4)] + ")"
}
}

View File

@ -26,7 +26,7 @@ class TestedClass {
}
func count(characters: String) -> Int {
return characters.characters.count
return characters.count
}
func withThrows() throws -> Int {
@ -106,7 +106,7 @@ public class PublicTestedClass {
}
func count(characters: String) -> Int {
return characters.characters.count
return characters.count
}
func withThrows() throws -> Int {
@ -147,7 +147,7 @@ public class PublicPublicTestedClass {
}
public func count(characters: String) -> Int {
return characters.characters.count
return characters.count
}
public func withThrows() throws -> Int {

View File

@ -15,7 +15,7 @@ class StubFunctionTest: XCTestCase {
let mock = MockTestedClass()
stub(mock) { mock in
when(mock.count(characters: "a")).then {
return $0.characters.count * 2
return $0.count * 2
}
}