TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: RK Test, a Google Test style library written in C99

2 点作者 Warwolt超过 1 年前
I really like Google Test, but am planning on doing some embedded development in C, where I sometimes find it awkward to test C code using a C++ library.<p>Therefore, I wrote a small unit test library closely mimicking Google Test. It consists of two source files, &quot;rktest.c&quot; and &quot;rktest.h&quot;, and is about 1k lines of code and written in C99.<p>It uses a trick for self registering tests by placing pointers to the unit test functions into a known place in program memory, that I first learned about from <a href="https:&#x2F;&#x2F;github.com&#x2F;christophercrouzet&#x2F;rexo&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;christophercrouzet&#x2F;rexo&#x2F;</a> and <a href="https:&#x2F;&#x2F;github.com&#x2F;Snaipe&#x2F;Criterion&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;Snaipe&#x2F;Criterion&#x2F;</a>.

暂无评论

暂无评论