Fix warnings.
This commit is contained in:
parent
96ebbbf9ca
commit
3adcde2fc0
|
@ -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)] + ")"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue