I am trying to setup test code coverage for a Swift application on Xcode 6 Beta 4.
I was able to do so in the past using ObjectiveC with Xcode 5, however I think I had to call the void __gcov_flush()
method, to trigger generation of the .gcda/.gcno files.
I set both properties for instrumentation and code coverage to YES
for the app and test targets.
However after running the tests, when I look in:
DerivedData/some subfolders/i386 all I see are files of type:
.d,.dia,.o,.swiftmodule and so on, but nothing that indicates code coverage.
Therefore I have two questions:
- Is code coverage expected to work for Swift using Xcode6 beta 4?
- If yes and it is necessary to flush gcov first, how do I do that from Swift?
Thanks