【文件属性】:
文件名称:mite:C语言的极简主义测试框架
文件大小:6KB
文件格式:ZIP
更新时间:2021-03-18 19:04:06
c testing test testing-framework C
螨:C语言的极简测试框架。
用法
将文件mite.c添加到目标项目,并将mite.h标头包含在每个测试源中。该框架定义了自己的main函数,因此带有项目main的文件应从测试设置中排除。
测试用例示例:
# include " mite.h "
TEST_CASE (my_test_case)
{
...
TEST (some_ptr != NULL );
TESTF (some_value > 0 , " invalid value %d " , some_value);
...
}
使用此框架编译的每个二进制文件也接受命令行选项:
:play_button: test_mite_binary --help
Usage: test_mite_binary [OPTION]...
Options:
-a, --all do not stop at the first fa
【文件预览】:
mite-master
----test_1.c(354B)
----mite.c(5KB)
----LICENSE(1KB)
----README.md(1013B)
----test_mite(147B)
----test_2.c(8B)
----mite.h(3KB)