We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
看来您可以使用 Ruby 和 RSpec 使用 swig 生成包装器来测试您的 C 代码! 请参阅 Ben Mabey 的帖子:
http://benmabey.com/2007/09/09/bdd- your-c.html
我已经尝试过这个例子,它对我有用。 我不确定是否有人进一步采取行动。
It seems you can test your C code using Ruby and RSpec using swig to generate wrappers! See Ben Mabey's post here:
http://benmabey.com/2007/09/09/bdd-your-c.html
I've tried that example out and it worked for me. I'm not sure if anyone has taken it any further.
原始链接 (CppSpec) 已失效,但仍可在 互联网档案,位于 CppSpec。
正如 @VickyChijwani 已经提到的,该项目的副本位于 Github - tpuronen/cppspec
The original link (CppSpec) is dead, but it is still accessible at the Internet Archive at CppSpec.
And as @VickyChijwani already mentioned, there's a copy of the project at Github - tpuronen/cppspec
Igloo 是我期待尝试的一个
Igloo is one I'm looking forward to try some time
由于需要一个类似 RSpec 的框架,我想添加最近的 igloo。
虽然最初针对的是Context/Spec语法,但它也支持Describe/It语法。 像那些基于 C 的框架一样,设置测试运行器和测试装置并没有太多噪音。 甚至感觉比 CppSpec 更好看。 他们通过使用合适的模板机制来实现这一点。
Since an RSpec like framework was requested, I'd like to add the recent igloo.
Though originally aiming at Context/Spec syntax, it also supports Describe/It syntax. There isn't much noise in setting the test runner and test fixtures up like in those C-based frameworks. It even feels better to look at than CppSpec. They achieve this through use of decent templating mechanics.
尝试 CBehave! 它是一个类似 RSpec 的 BDD 框架,使用给定/何时/然后宏。 例子:
Try CBehave! It is an RSpec-like BDD framework that uses given/when/then macros. Example:
cspec 适用于 C。大概它可以与 C++ 一起使用。 行为驱动开发维基百科页面上有适用于各种语言的工具列表。
cspec is for C. Presumably it will work with C++. There is a list of tools for various languages on the Behavior Driven Development Wikipedia page.