Any Test class I create from the Tests Navigator (the plus (+) button on the left bottom), it add: #import <SenTestingKit/SenTestingKit.h>
instead of XCTest.
Note: This is an existing project, old ones which I recently updated to use ARC instead of MRC, it is up and running and GHUnit ( https://github.com/gh-unit/gh-unit ) was working on it, I've removed GHUnit in order to use XCTest.
These are the steps:
From the project navigator I click the + button to add a "New Test Class".
I set the Class name...
Set where the class will be saved...
The file is created, however instead of import XCTest it does import SenTestKit =(
However it creates properly if I create the class using: File > New > File then select "Test Case Class" click "Next" set the class name, the screen is different, it show a "Subclass of" dropdown and XCTestCase is selected on it:
Then the XCTest class is created properly:
This what I did trying to solve the issue:
Did not solve the issue. This happens even if I create a new project :(
Any thoughts?
I did contact Apple and looks likes this is a bug on XCode.
You can see the thread here: https://devforums.apple.com/message/1094651#1094651
Also, these steps can be used as an workaround:
File > New > File then select "Test Case Class" click "Next" set the class name.
The Test Class will be created properly.
I will post more details here once the Apple people update the bug I did report.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.