ios单元测试工程建立
returnValue, @"Should have returned the expected string."); } @end
编译运行,点击 Run,效果如下图。
3
至此,iOS下的OCUnit,GHUnit,OCMock单元测试介绍就到此结束了。当然还有其他一些测试框架,比如google出品的 GTM。 参考资料:
OCMock: http://www.77cn.com.cn/
Unit Testing in Xcode 4- use OCUnit and SenTest instead of GHUnit GHUnit Reference: http://www.77cn.com.cn/gh-unit/ 转自:飘飘白云