Criterion: 一個簡單要死的C編程語言測試框架

jopen 10年前發布 | 17K 次閱讀 Criterion 測試工具

一個簡單要死,但可擴展的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.
  • </ul>

    用法

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

    $ gcc -o test test.c -lcriterion

    項目主頁:http://www.baiduhome.net/lib/view/home/1423299375061

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!