<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>《C单元测试之使用cmockery》的评论</title>
	<atom:link href="http://tonybai.com/2009/08/22/introduce-cmockery-for-c-unit-test/feed/" rel="self" type="application/rss+xml" />
	<link>https://tonybai.com/2009/08/22/introduce-cmockery-for-c-unit-test/</link>
	<description>一个程序员的心路历程</description>
	<lastBuildDate>Fri, 17 Apr 2026 15:31:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>作者：gzm55</title>
		<link>https://tonybai.com/2009/08/22/introduce-cmockery-for-c-unit-test/#comment-407</link>
		<dc:creator>gzm55</dc:creator>
		<pubDate>Tue, 25 Aug 2009 01:20:30 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2009/08/22/c%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95%e4%b9%8b%e4%bd%bf%e7%94%a8cmockery/#comment-407</guid>
		<description>mock的设计感觉很好, 可是使用单进程模型, 比如下面的三个测试不能同时测试, 主要是后两个会结束测试进程. 这方面cgreen和check都做的很不错. 但是windows下很难fork, 折中多进程的单元测试很难在win上移植呀~

// A test case that does nothing and succeeds.
void null_test_div0(void **state) {
	int a = 5;
	a = a / 0;
}

// A test case that does nothing and succeeds.
void null_test_exit(void **state) {
	exit(1);
}

// A test case that does nothing and succeeds.
void null_test_asert(void **state) {
	assert(0);
}</description>
		<content:encoded><![CDATA[<p>mock的设计感觉很好, 可是使用单进程模型, 比如下面的三个测试不能同时测试, 主要是后两个会结束测试进程. 这方面cgreen和check都做的很不错. 但是windows下很难fork, 折中多进程的单元测试很难在win上移植呀~</p>
<p>// A test case that does nothing and succeeds.<br />
void null_test_div0(void **state) {<br />
	int a = 5;<br />
	a = a / 0;<br />
}</p>
<p>// A test case that does nothing and succeeds.<br />
void null_test_exit(void **state) {<br />
	exit(1);<br />
}</p>
<p>// A test case that does nothing and succeeds.<br />
void null_test_asert(void **state) {<br />
	assert(0);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：guixue</title>
		<link>https://tonybai.com/2009/08/22/introduce-cmockery-for-c-unit-test/#comment-408</link>
		<dc:creator>guixue</dc:creator>
		<pubDate>Sun, 23 Aug 2009 02:04:47 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2009/08/22/c%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95%e4%b9%8b%e4%bd%bf%e7%94%a8cmockery/#comment-408</guid>
		<description>你研究的很深入！不错，学习了。</description>
		<content:encoded><![CDATA[<p>你研究的很深入！不错，学习了。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
