iOS 开发实用技术导航
NSHipster 中文版
› http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
› http://www.cocos2d-iphone.org/
CocoaPods
› http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
› http://code.google.com/mobile/analytics/
WWDC
› https://developer.apple.com/wwdc/
Design Guides and Resources
› https://developer.apple.com/design/
Transcripts of WWDC sessions
› http://asciiwwdc.com
Cocoa with Love
› http://cocoawithlove.com/
Cocoa Dev Central
› http://cocoadevcentral.com/
NSHipster
› http://nshipster.com/
Style Guides
› Google Objective-C Style Guide
› NYTimes Objective-C Style Guide
Useful Tools and Services
› Charles Web Debugging Proxy
› Smore
fly2never
V2EX  ›  iDev

Swift 不支持 XCTAssertThrows, 不方便

  •  
  •   fly2never · Aug 9, 2015 · 3050 views
    This topic created in 4068 days ago, the information mentioned may be changed or developed.
    原来要测试NSAssert行为, 需要自己封装MyAssert, 然后在测试target时不NSAssert,而是改成抛出异常. 这样才能用XCTAssertThrows来测试.

    现在改成了用Swift来写测试代码, 发现XCTAssertThrows都没有了, 只能又重新写一个OC测试文件来专门测试throw行为.

    大家有没有什么好办法
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2939 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 12:32 · PVG 20:32 · LAX 05:32 · JFK 08:32
    ♥ Do have faith in what you're doing.