Reputation: 169
I am learning some TDD for Swift and I came across an issue that Xcode wont compile my test code. I have no clue what could be wrong with this.
Other tests are working fine (also tests for "ListItem" and "Location"). I also closed Xcode many times and cleared Derived Data and even the project itself.
Below the screenshots of code and compile error. If I change the "ListItem" parameter in the method to "Any" (and change the type of the array also), it is compiling. But this is not the code I want without the specific type.
Thanks!
Upvotes: 1
Views: 317
Reputation: 169
Found the solution here: swift Xcode unit test: Cannot convert value of type "Person" to expected argument type "Person"
Seems that the ItemManager .swift file was not added to the test target of the project (derp)..
Upvotes: 1