Kiwi for iOSiOS 单元测试框架

联合创作 · 2023-10-01 15:23

Kiwi 是 Objective-C 的单元测试框架,因其简单的接口而著名,基于 Objective-C 编写,只支持 iOS 应用

示例代码:

describe(@"Team", ^{
    context(@"when newly created", ^{
        it(@"should have a name", ^{
            id team = [Team team];
            [[team.name should] equal:@"Black Hawks"];
        });

        it(@"should have 11 players", ^{
            id team = [Team team];
            [[[team should] have:11] players];
        });
    });
});
浏览 8
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报