【介绍】
CUnit是C语言环境下的开放源码的白盒测试用例。CUnit以静态库的形式提供给用户使用,用户编写程序的时候直接链接此静态库。
【安装】
下载:https://gitlab.com/cunity/cunit/
wget https://gitlab.com/cunity/cunit/-/archive/master/cunit-master.zip && unzip cunit-master.zip && cd cunit-master && mkdir local-build && cd local-build && cmake .. && cmake --build . && make && make install
输出:
... -- Installing: /usr/local/include/cunit/CUnit.h ... -- Installing: /usr/local/lib/cunit/libcunit.a
环境参数:
CUNIT_CFLAGS="-I/usr/local/include/CUnit" CUNIT_LIBS="-L/usrlocal/lib/cunit -lcunit"