NSParameterAssert (Expression) 系統宏
使用方法:
NSInteger result = 2;
NSParameterAssert (result == 1); /// 如果條件為false,程序崩潰
NSLog(@"可以通過");
NSAssert(Expression, @"xxx") 系統宏
使用方法:
NSInteger result = 2;
NSAssert (result == 1, @"不能為空"); /// 如果條件為false,程序崩潰
NSLog(@"可以通過");