Criterion: 一个简单要死的C编程语言测试框架

jopen 10年前

一个简单要死,但可扩展的C测试框架。它是一个符合KISS(Keep It Simple, Stupid)原则(懒人原则)的非侵入式C语言测试框架。与其它测试框架不同,它简单易用,声明即注册,实时报告测试进度和统计数据。

  • Tests are automatically registered when declared.
  • A default entry point is provided, no need to declare a main unless you want to do special handling.
  • Test are isolated in their own process, crashes and signals can be reported and tested.
  • Progress and statistics can be followed in real time with report hooks.

用法

Given a test file named test.c, compile it with-lcriterion:

$ gcc -o test test.c -lcriterion

项目主页:http://www.open-open.com/lib/view/home/1423299375061