Object-C Commmand Line Tool 模式下使用unit test

创建unit test文件

File->New->Target…->macOS Unit Testing Bundle,然后导入需要测试的类开始验证。
Object-C Commmand Line Tool 模式下使用unit test
Object-C Commmand Line Tool 模式下使用unit test
Object-C Commmand Line Tool 模式下使用unit test

解决’XCTest/XCTest.h’ file not found

Build Settings->Search Paths->Framework Search Paths添加:
$(PLATFORM_DIR)/Developer/Library/Frameworks
Object-C Commmand Line Tool 模式下使用unit test