一、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

最低0.47元/天 解锁文章
677

被折叠的 条评论
为什么被折叠?



