02 - Unity Test 测试框架的使用

一、Unity Test 测试框架的使用

1.1 Unity Test 简介

Welcome to the Unity Test Project, one of the main projects of ThrowTheSwitch.org. Unity Test is a unit testing framework built for C, with a focus on working with embedded toolchains.

This project is made to test code targetting microcontrollers big and small. The core project is a single C file and a pair of headers, allowing it to be added to your existing build setup without too much headache.

Unity Test 是一个为 C 语言搭建的单元测试框架,主体包含一个 C 文件与两个头文件,通过引用这三个文件,就可以对我们现有的工程进行测试了~

1.2 Unity Test 文件说明

1.2.1 Unity Test 源码下载

【下载地址】: ThrowTheSwitch/Unity: Simple Unit Testing for C (github.com)

打开下载地址,点击 code 后,如下图
源码下载示例

  • 点击 Download ZIP 下载压缩包,解压即可使用(推荐,并建议保留压缩包作为副本
  • 复制 HTTPS 链接,使用 Git 克隆 Unity 项目到本地(没有 github 账户的同学可以直接下载压缩包)

1.2.2 文件说明

  • docs :一些帮助文档,其中 UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf 列举了大部分断言结构,更加详尽的断言描述参考 UnityAss
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值