TDD??iOS???????????Kiwi???????
???????????? ???????[ 2014/2/24 13:42:41 ] ???????????????
??????????
????VVStackTests.m??Xcode??????????????????????????????????????????????????????????????????????????£?
#import<XCTest/XCTest.h>
@interfaceVVStackTests:XCTestCase
@end
@implementationVVStackTests
-(void)setUp
{
[supersetUp];
//Putsetupcodehere.Thismethodiscalledbeforetheinvocationofeachtestmethodintheclass.
}
-(void)tearDown
{
//Putteardowncodehere.Thismethodiscalledaftertheinvocationofeachtestmethodintheclass.
[supertearDown];
}
-(void)testExample
{
XCTFail(@"Noimplementationfor"%s""??__PRETTY_FUNCTION__);
}
@end
|
?????????????VVStackTests??XCTestCase????????XCTestCase????XCTest???????е??????????XCTest????в??????????????target?е?????XCTestCase????????????????test???????????????????????????????-testExample??????У??????????????Xcode???д?????XCTFail???????????????????????????????????????????????ν????????ж?????????????????????????????????????????漲????????????????????Fail?????????????????????????ò??????????????????????-setUp??-tearDown????????????????????????????????????????????????????????????á?????????????????д?????????????????????-testExample????????????????U?????в?????????????????????????????????κβ????????
??????????????????????????ɡ???????????????????????????????????????????????????????????????????????????VVStack????????棬?????????????Cocoa Touch?????NSObject????????????????????????????????TDD???????????д??????????????????????????????????????VVStack?????????????????????????????????????????????????д???????????????????#import "VVStack.h"???????VVStackTests.m??@end?????????′???
- (void)testStackExist {
XCTAssertNotNil([VVStack class]?? @"VVStack class should exist.");
}
- (void)testStackObjectCanBeCreated {
VVStack *stack = [VVStack new];
XCTAssertNotNil(stack?? @"VVStack object can be created.");
}
|
????????????????????????????????????????????????????????????????????VVStack?????????ò??????????????????????????VVStack????????Cocoa Touch??Objective-C class?????VVStack?????NSObject?????????????????????????????????target?У?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11