Xcode 单元测试
项目创建后自动创建的单元测试文件夹, 文件夹名为项目名+tests, xcode6后貌似没有选择是否添加测试target的选择了。
默认生成的如下图
提供的断言如下
typedefNS_ENUM(NSUInteger, _XCTAssertionType) {
_XCTAssertion_Fail,
_XCTAssertion_Nil,
_XCTAssertion_NotNil,
_XCTAssertion_EqualObjects,
_XCTAssertion_NotEqualObjects,
_XCTAssertion_Equal,
_XCTAssertion_NotEqual,
_XCTAssertion_EqualWithAccuracy,
_XCTAssertion_NotEqualWithAccuracy,
_XCTAssertion_GreaterThan,
_XCTAssertion_GreaterThanOrEqual,
_XCTAssertion_LessThan,
_XCTAssertion_LessThanOrEqual,
_XCTAssertion_True,
_XCTAssertion_False,
_XCTAssertion_Throws,
_XCTAssertion_ThrowsSpecific,
_XCTAssertion_ThrowsSpecificNamed,
_XCTAssertion_NoThrow,
_XCTAssertion_NoThrowSpecific,
_XCTAssertion_NoThrowSpecificNamed,
};
☆☆☆ 共同学习,欢迎拍砖;转载请注明出处,谢谢。欢迎关注我的公众号:闲聊编程。☆☆☆