0
이것은 매우 쉽거나 어리 석었지만 실제로 발생하는 이유를 찾을 수 없습니다.사용자 지정 XCTestCase 클래스 - 테스트가 실행되지 않습니다.
XCTestCase를 상속 한 사용자 지정 클래스를 만들었습니다. 테스트를 실행하려고하면 해당 클래스의 테스트가 실행되지 않습니다.
이 내 클래스 :
@interface TNMediaBarTest : XCTestCase
@end
@implementation TNMediaBarTest
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class. }
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown]; }
- (void)TNMediaBarLocationButtonTest {
TNMediaBar *mediaBar = [[TNMediaBar alloc] initWithFrame:CGRectZero];
XCTAssertNil(mediaBar.location, @"There's junk in location property after initialization");
[mediaBar locationButtonTapped];
XCTAssertNotNil(mediaBar.location, @"Location is empty after tapping on location button");
[mediaBar locationButtonTapped];
XCTAssertNil(mediaBar.location, @"Location is not empty after tapping on location button a second time"); }
하지만 얻을 :
당신이 좋아하는test
와 시험 방법의 이름 앞에 필요
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
그래, 나는 그것이 이런 종류의 것임을 알았다. 고맙습니다. –