<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Johannes Passing&#039;s Blog &#187; cfix</title>
	<atom:link href="http://jpassing.com/category/cfix/feed/" rel="self" type="application/rss+xml" />
	<link>http://jpassing.com</link>
	<description></description>
	<lastBuildDate>Tue, 22 May 2012 05:39:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jpassing.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Johannes Passing&#039;s Blog &#187; cfix</title>
		<link>http://jpassing.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jpassing.com/osd.xml" title="Johannes Passing&#039;s Blog" />
	<atom:link rel='hub' href='http://jpassing.com/?pushpress=hub'/>
		<item>
		<title>How to test MFC applications using Visual Assert or cfix</title>
		<link>http://jpassing.com/2010/09/26/how-to-test-mfc-applications-using-visual-assert-or-cfix/</link>
		<comments>http://jpassing.com/2010/09/26/how-to-test-mfc-applications-using-visual-assert-or-cfix/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 10:41:27 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[mfc]]></category>
		<category><![CDATA[unit test]]></category>
		<category><![CDATA[visualassert]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=596</guid>
		<description><![CDATA[Automated testing of GUI applications is tricky. It is not only tricky because testing the GUI itself is hard (despite there being good tools around), it is also tricky because GUI applications often tend to be a bit hostile towards unit testing. One class of GUI applications for which this kind of hostility often applies [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=596&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Automated testing of GUI applications is tricky. It is not only tricky because testing the GUI itself is hard (despite there being good tools around), it is also tricky because GUI applications often tend to be a bit hostile towards unit testing.</p>
<p>One class of GUI applications for which this kind of hostility often applies is MFC applications. Although MFC allows the use of DLLs, components, etc, the framework still encourages the use of relatively monolithic architectures.</p>
<p>Regardless of whether this is a good or bad thing, the question is how to make unit testing MFC applications feasible and less painful.</p>
<p>In one of the last releases, both cfix and Visual Assert introduced the abilify to embed unit tests into executable modules. That is, the framework allows unit tests to be compiled and linked into the main application .exe file. Such an executable can then be run in two modes: On the one hand, it can be launched regularly and the existance of unit tests will largely go unnnoticed. On the other hand, the executable can be launched indirectly via cfix of Visual Assert &#8212; and in this case, the application will not have its WinMain routine run, but rather have its unit tests be executed.</p>
<p>Although this feature enables us to do unit testing without having to rethink or tweak the application&#8217;s architecture more than necessary, the question still in how far MFC <i>likes</i> this kind of testing.</p>
<p>At this point, a distinction has to be made on whether the unit tests make use of MFC APIs or not. Tests that only exercise internal methods will run smoothless, without further setup or precautions needed. Of course, this also holds for tests that make of of basic MFC functionality such as using classes like CString or CArray.</p>
<p>For test that make use of more &#8220;interesting&#8221; MFC functions, however, it is quite possible that you will observe slightly strange behavior: API calls failing, fields not having the proper value, or maybe even crashes.</p>
<p>An example for this is the field <code>AFX_MODULE_STATE::m_hCurrentInstanceHandle</code>. During a normal run, this field will hold the address of the current module. In a unit tests, however, the following assertion will fail:</p>
<blockquote><pre>
CFIX_ASSERT( AfxGetModuleState()-&gt;m_hCurrentInstanceHandle != 0 );
</pre>
</blockquote>
<p>If you think about this for a minute, this should not really come as a surprise. As described previously, Visual Assert/cfix, when attempting to run tests embedded into an executable module, will not call the applocation&#8217;s WinMain/main routine. They will ensure that all initializers (in particular: constructors of global C++ objects) are run, but calling the actual main routine is effectively skipped. Many of the MFC APIs, however, rely on quite a bit of initialization work that is performed during startup. Some of this work is conducted as part of constructors of global objects executed, a significant part of this work, however, is done in <code>AfxWinInit</code>.</p>
<p>Quoting <a href='http://msdn.microsoft.com/en-us/library/w04bs753(VS.80).aspx'>MSDN</a>:</p>
<blockquote><p>
This function is called by the MFC-supplied WinMain function, as part of the CWinApp initialization of a GUI-based application, to initialize MFC.
</p></blockquote>
<p>And indeed, if you look at the default MFC WinMain routine, <code>AfxWinMain</code>, you will see that it calls <code>AfxWinInit</code>.</p>
<p>The key to using &#8220;interesting&#8221; MFC APIs in your unit tests therefore is to make sure that <code>AfxWinMain</code> has been called before.</p>
<p>Unfortunately, there is no counterpart to AfxWinInit, so initializing MFC in a fixture&#8217;s Before or Setup routine and shutting MFC down in a After or Teardown routine is not feasible. Rather, you have to call it once <i>per process</i>, something that is a bit unusual for unit testing and requires a tiny bit of manual work. The easiest way to accomplish this is to a lazy initialization helper routine:</p>
<blockquote><pre>
static void InitalizeMfc()
{
  static BOOL Initialized = FALSE;
  if ( ! Initialized )
  {
    CFIX_ASSERT( AfxWinInit(
      ::GetModuleHandle(NULL),
      NULL,
      ::GetCommandLine(),
      0 ) );
    Initialized = TRUE;
  }
}
</pre>
</blockquote>
<p>&#8230;and call it from each fixture&#8217;s Setup routine:</p>
<blockquote><pre>
static void SetUp()
{
  InitalizeMfc();
}
</pre>
</blockquote>
<p>With this in place, MFC APIs will now work properly and <code>AfxGetModuleState()-&gt;m_hCurrentInstanceHandle</code> will contain a proper address. </p>
<p>With this bit of MFC background in mind, writing unit tests for MFC applications should be not much different than writing tests for any other kind of application.</p>
<p><i>One final tip</i>: Adding unit tests to your project introduces a dependeny to cfix.dll. In your final build, you&#8217;ll want to remove (#ifdef out, for example) all your tests so this dependency will disappear. During development, however, this dependency might be a bit of a drag because there might be machines on which cfix is not available. To alleviate this situation, consider making cfix.dll a delay-load: Unless you want to run unit tests, it is then ok to miss cfix.dll on other machines.</p>
<br />Filed under: <a href='http://jpassing.com/category/cfix/'>cfix</a>, <a href='http://jpassing.com/category/testing/'>Testing</a>, <a href='http://jpassing.com/category/visual-assert/'>Visual Assert</a>, <a href='http://jpassing.com/category/win32/'>Win32</a> Tagged: <a href='http://jpassing.com/tag/mfc/'>mfc</a>, <a href='http://jpassing.com/tag/testing/'>Testing</a>, <a href='http://jpassing.com/tag/unit-test/'>unit test</a>, <a href='http://jpassing.com/tag/visualassert/'>visualassert</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/596/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/596/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/596/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/596/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/596/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/596/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/596/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/596/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/596/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/596/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/596/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/596/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/596/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/596/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=596&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2010/09/26/how-to-test-mfc-applications-using-visual-assert-or-cfix/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Assert 1.1 beta and cfix 1.7 released</title>
		<link>http://jpassing.com/2010/05/24/visual-assert-1-1-beta-and-cfix-1-7-released/</link>
		<comments>http://jpassing.com/2010/05/24/visual-assert-1-1-beta-and-cfix-1-7-released/#comments</comments>
		<pubDate>Mon, 24 May 2010 09:08:38 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Win32]]></category>

		<guid isPermaLink="false">http://jpassing.com/?p=660</guid>
		<description><![CDATA[Slightly delayed, Visual Assert 1.1 beta is now available for download. As announced in a previous post, the most important change in the new version is added suport for the latest version of Visual Studio, Visual Studio 2010. However, the new version also brings a couple of new features that apply to all versions of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=660&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Slightly delayed, Visual Assert 1.1 beta <a href='http://www.visualassert.com/unit-testing-framework/download.html'>is now available for download</a>. As announced in a <a href='/2010/04/18/coming-soon-visual-assert-for-visual-studio-2010/'>previous post</a>, the most important change in the new version is added suport for the latest version of Visual Studio, Visual Studio 2010.</p>
<p>However, the new version also brings a couple of new features that apply to all versions of Visual Studio. Most importantly, cfix and Visual Assert now expose an <a href='http://www.visualassert.com/visual-studio-addin/doc/EventAPI.html'>API that allows developers to plug in custom <i>event sinks</i></a>. A custom event sink is implemented as a DLL and receives all events the runtime generates during the execution of a test suite. As such, the API is perfectly suited for implementing custom loggers.</p>
<p><a href="http://jpassing.files.wordpress.com/2010/05/opt1.png"><img src="http://jpassing.files.wordpress.com/2010/05/opt1.png?w=150&h=87" alt="" title="Options Dialog: General" width="150" height="87" class="alignleft size-thumbnail wp-image-663" /></a></p>
<p>To make this new feature easily usable, the Options dialog (Menu: <i>Tools &gt; Options</i>) has been enhanced appropriately. Moreover, the dialog  now includes some further options concerning stack size, current directory adjustment, and VC++ directory registration that have not been exposed previously.</p>
<p><a href="http://jpassing.files.wordpress.com/2010/05/opt2.png"><img src="http://jpassing.files.wordpress.com/2010/05/opt2.png?w=150&h=87" alt="" title="Options Dialog: Host Process" width="150" height="87" class="alignleft size-thumbnail wp-image-664" /></a></p>
<p>Coming along with the new Visual Assert release, a new cfix release, version 1.7, is <a href='http://sourceforge.net/projects/cfix/files/cfix/'>now available on Sourceforge</a>.</p>
<br />Filed under: <a href='http://jpassing.com/category/cfix/'>cfix</a>, <a href='http://jpassing.com/category/testing/'>Testing</a>, <a href='http://jpassing.com/category/tools/'>Tools</a>, <a href='http://jpassing.com/category/visual-assert/'>Visual Assert</a>, <a href='http://jpassing.com/category/visual-studio/'>Visual Studio</a>, <a href='http://jpassing.com/category/win32/'>Win32</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/660/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=660&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2010/05/24/visual-assert-1-1-beta-and-cfix-1-7-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2010/05/opt1.png?w=150" medium="image">
			<media:title type="html">Options Dialog: General</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2010/05/opt2.png?w=150" medium="image">
			<media:title type="html">Options Dialog: Host Process</media:title>
		</media:content>
	</item>
		<item>
		<title>Coming soon: Visual Assert for Visual Studio 2010</title>
		<link>http://jpassing.com/2010/04/18/coming-soon-visual-assert-for-visual-studio-2010/</link>
		<comments>http://jpassing.com/2010/04/18/coming-soon-visual-assert-for-visual-studio-2010/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 08:46:50 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[addin]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[visual studio 2010]]></category>
		<category><![CDATA[vs]]></category>
		<category><![CDATA[vs2010]]></category>

		<guid isPermaLink="false">http://jpassing.com/?p=656</guid>
		<description><![CDATA[Now that Visual Studio 2010 has oficially been released, I keep getting questions about a Visual Studio 2010-enabled version of Visual Assert. The fact that Visual Studio 2010 is already out, yet there is no Visual Assert version for it is unfortunate. It would have been nice to have Visual Studio 2010 support ready on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=656&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Now that Visual Studio 2010 has oficially been <a href='http://go.microsoft.com/?LinkId=9725695'>released</a>, I keep getting questions about a Visual Studio 2010-enabled version of Visual Assert.</p>
<p>The fact that Visual Studio 2010 is already out, yet there is no Visual Assert version for it is unfortunate. It would have been nice to have Visual Studio 2010 support ready on Visual Studio&#8217;s release date, however, that was not possible due to lack of time. Having solved most compatibilty issues though (of which there were many, Visual Studio 2010 is a truly painful release for AddIn developers), I am now confident to be able to offer <b>a first beta by begin of May</b>.</p>
<p>This version will not only add support for Visual Studio 2010, but will also contain a set of other improvements and new features.</p>
<br />Filed under: <a href='http://jpassing.com/category/cfix/'>cfix</a>, <a href='http://jpassing.com/category/visual-assert/'>Visual Assert</a>, <a href='http://jpassing.com/category/visual-studio/'>Visual Studio</a> Tagged: <a href='http://jpassing.com/tag/addin/'>addin</a>, <a href='http://jpassing.com/tag/cfix/'>cfix</a>, <a href='http://jpassing.com/tag/qa/'>qa</a>, <a href='http://jpassing.com/tag/testing/'>Testing</a>, <a href='http://jpassing.com/tag/visual-assert/'>Visual Assert</a>, <a href='http://jpassing.com/tag/visual-studio-2010/'>visual studio 2010</a>, <a href='http://jpassing.com/tag/vs/'>vs</a>, <a href='http://jpassing.com/tag/vs2010/'>vs2010</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/656/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/656/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/656/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/656/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/656/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/656/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/656/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/656/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/656/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/656/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/656/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/656/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/656/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/656/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=656&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2010/04/18/coming-soon-visual-assert-for-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Assert hits RTM, now available for free</title>
		<link>http://jpassing.com/2010/01/31/visual-assert-hits-rtm-now-available-for-free/</link>
		<comments>http://jpassing.com/2010/01/31/visual-assert-hits-rtm-now-available-for-free/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 12:59:01 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[addin]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[rtm]]></category>
		<category><![CDATA[VC]]></category>
		<category><![CDATA[vs]]></category>

		<guid isPermaLink="false">http://jpassing.com/?p=642</guid>
		<description><![CDATA[Visual Assert, the unit testing Add-In for Visual Studio/Visual C++ has finally left its beta status and &#8212; better yet &#8212; is now available for free, both for commercial and non-commercial use. Visual Assert, based on the cfix 1.6 unit testing framework, allows you to easily write, manage, run, and debug your C/C++ unit tests [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=642&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.visualassert.com/'>Visual Assert, the unit testing Add-In for Visual Studio/Visual C++</a> has finally left its beta status and &#8212; better yet &#8212; is now available <b>for free</b>, both for commercial and non-commercial use.<br />
<img src="http://jpassing.files.wordpress.com/2010/01/visualassertscreenshot.png?w=200&h=170" alt="" title="Visual Assert Screenshot" width="200" height="170" class="alignright size-medium wp-image-643" /></p>
<p>Visual Assert, based on the <a href='http://www.cfix-testing.org/'>cfix 1.6</a> unit testing framework, allows you to easily write, manage, run, and debug your C/C++ unit tests -– without ever leaving the Visual Studio® IDE. No fiddling with command line tools, no complex configuration, and no boilerplate code required.</p>
<p>Sounds good? Then go straight to the <a href='http://www.visualassert.com/'>Visual Assert homepage</a> and download the installer!</p>
<br />Filed under: <a href='http://jpassing.com/category/cfix/'>cfix</a>, <a href='http://jpassing.com/category/testing/'>Testing</a>, <a href='http://jpassing.com/category/tools/'>Tools</a>, <a href='http://jpassing.com/category/visual-assert/'>Visual Assert</a>, <a href='http://jpassing.com/category/visual-studio/'>Visual Studio</a>, <a href='http://jpassing.com/category/win32/'>Win32</a> Tagged: <a href='http://jpassing.com/tag/addin/'>addin</a>, <a href='http://jpassing.com/tag/c/'>c</a>, <a href='http://jpassing.com/tag/free/'>free</a>, <a href='http://jpassing.com/tag/plugin/'>plugin</a>, <a href='http://jpassing.com/tag/release/'>release</a>, <a href='http://jpassing.com/tag/rtm/'>rtm</a>, <a href='http://jpassing.com/tag/vc/'>VC</a>, <a href='http://jpassing.com/tag/vs/'>vs</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/642/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=642&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2010/01/31/visual-assert-hits-rtm-now-available-for-free/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2010/01/visualassertscreenshot.png?w=300" medium="image">
			<media:title type="html">Visual Assert Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix 1.6 released, simplifies authoring of multi-threaded tests</title>
		<link>http://jpassing.com/2010/01/31/cfix-1-6-released-simplifies-authoring-of-multi-threaded-tests/</link>
		<comments>http://jpassing.com/2010/01/31/cfix-1-6-released-simplifies-authoring-of-multi-threaded-tests/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 12:56:03 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[oss]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://jpassing.com/?p=640</guid>
		<description><![CDATA[A new release of cfix, the unit testing framework for C and C++, is now available for download. Besides some minor enhancements like extending the maximum permitted fixture name, cfix 1.6 introduces a major new feature, Anonymous Thread Auto-Registration. Since its very first release, cfix has supported multi-threaded test cases, i.e. test cases that spawn [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=640&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A new release of <a href='http://www.cfix-testing.org/'>cfix, the unit testing framework for C and C++</a>, is now available for download. Besides some minor enhancements like extending the maximum permitted fixture name, cfix 1.6 introduces a major new feature, <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/AnonymousThreadsAutoRegistration.html'><i>Anonymous Thread Auto-Registration</i></a>. </p>
<p>Since its very first release, cfix has supported multi-threaded test cases, i.e. test cases that spawn child threads, each of which potentially making use of the various assertion statements like CFIX_ASSERT. To make this work and ensure that failing assertions are handled properly, however, usage of <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/CfixCreateThread.html'>CfixCreateThread</a> (rather than the native Win32 CreateThread) was mandatory when spawning such threads. </p>
<p>Although using CfixCreateThread (or <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/CfixCreateSystemThread.html'>CfixCreateSystemThread</a> in case of kernel mode code) remains the preferred way to create child threads, there are situations where usage of this API is not possible &#8212; for example, when the child threads are created by libraries such as <i>boost</i>.</p>
<p>To support such scenarios, cfix now allows you to annotate a fixture to enable <i>Anonymous Thread Auto-Registration</i>, which means that newly spawned threads are automatically registered with cfix &#8212; no usage of CfixCreateThread required. Thanks to this feature, writing multi-threaded tests becomes straightforward &#8212; and integrating with libraries such as boost does not pose a problem any more.</p>
<p>For more details about this feature, please refer to the <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/AnonymousThreadsAutoRegistration.html'>respective section in the cfix documentation</a>.</p>
<p>As always, updated binaries and source code are available on <a href='http://sourceforge.net/projects/cfix/files/'>Sourceforge</a>.</p>
<br />Filed under: <a href='http://jpassing.com/category/cfix/'>cfix</a>, <a href='http://jpassing.com/category/testing/'>Testing</a>, <a href='http://jpassing.com/category/tools/'>Tools</a>, <a href='http://jpassing.com/category/visual-assert/'>Visual Assert</a> Tagged: <a href='http://jpassing.com/tag/cfix/'>cfix</a>, <a href='http://jpassing.com/tag/functional-testing/'>functional testing</a>, <a href='http://jpassing.com/tag/open-source/'>open source</a>, <a href='http://jpassing.com/tag/oss/'>oss</a>, <a href='http://jpassing.com/tag/qa/'>qa</a>, <a href='http://jpassing.com/tag/testing/'>Testing</a>, <a href='http://jpassing.com/tag/unit-testing/'>unit testing</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/640/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=640&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2010/01/31/cfix-1-6-released-simplifies-authoring-of-multi-threaded-tests/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>How to customize test run execution to make your cfix test runs more effective</title>
		<link>http://jpassing.com/2010/01/24/how-to-cutomize-test-run-execution-to-make-your-cfix-test-runs-more-effective/</link>
		<comments>http://jpassing.com/2010/01/24/how-to-cutomize-test-run-execution-to-make-your-cfix-test-runs-more-effective/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 09:51:04 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[fixture]]></category>
		<category><![CDATA[harness]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[unit testing framework]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=369</guid>
		<description><![CDATA[One of the features introduced back in cfix 1.2 was the ability to customize test execution with the command line parameters -fsr and -fsf. Using these switches can make your test runs more effective and can help simplify debugging &#8212; so it is worth spending a minute on this topic. Assume our test run comprises [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=369&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the features introduced back in <a href='http://www.cfix-testing.org/'>cfix 1.2</a> was the ability to customize test execution with the command line parameters <tt>-fsr</tt> and <tt>-fsf</tt>. Using these switches can make your test runs more effective and can help simplify debugging &#8212; so it is worth spending a minute on this topic.</p>
<p>Assume our test run comprises two fixtures, <i>Fixture A</i> and <i>Fixture B</i>. As fixtures are always run in alphabetic order, and tests run in the order they are defined, the first test to be executed is <i>Test 1</i> of <i>Fixture A</i>, followed by <i>Test 2</i> of <i>Fixture A</i>, and so on. Assuming all tests of <i>Fixture A</i> succeed, execution then proceeds with the first test of <i>Fixture B</i>. The following figure illustrates this:</p>
<img src="http://jpassing.files.wordpress.com/2009/07/fixtureexecution_success.png?w=500" alt="Successful execution of a unit testing suite" title="unit testing"   class="size-full wp-image-370" />
<p>Things get interesting when one of the tests fails: Let us assume <i>Test 2</i> of <i>Fixture A</i> leads to a failed assertion. The default behavior of cfix, which equals the behavior of JUnit and NUnit, is to report the failure and proceed with <i>Test 3</i> of the same fixture:</p>
<img src="http://jpassing.files.wordpress.com/2009/07/fixtureexecution_def.png?w=500" alt="Execution resumes after a failed unit test" title="framework"   class="size-full wp-image-371" />
<p>In many cases, this is the appropriate thing to do &#8212; letting the test run to completion and figure out the reasons for the failure afterwards. But in certain scenarios, resuming with <i>Test 3</i> might not be the smartest thing to do &#8212; rather, as soon as a test fails, execution should proceed with the next <i>fixture</i>. This is what <tt>-fsf</tt> (<i>&#8220;<b>s</b>hort-circuit <b>f</b>ixture&#8221;</i>) does:</p>
<img src="http://jpassing.files.wordpress.com/2009/07/fixtureexecution_fsf.png?w=500" alt="Short-circuiting the fixture" title="Short-circuiting the fixture"   class="size-full wp-image-375" />
<p>Once a test case has failed, all remaining tests of the same fixture are skipped.</p>
<p>When debugging, even resuming at the next fixture is often not desired. Rather, as soon as one test fails, you may immediately want to take a closer a look at the failure, so resuming the run is mute. <tt>-fsr</tt> (<i>&#8220;<b>s</b>hort-circuit <b>r</b>un&#8221;</i>) does right that: It aborts the run immediately.</p>
<img src="http://jpassing.files.wordpress.com/2009/07/fixtureexecution_fsr21.png?w=500" alt="Short-circuiting the run" title="Short-circuiting the run"   class="size-full wp-image-374" />
<p>By the way &#8212; in <a href='http://www.visualassert.com/'>Visual Assert</a>, you can quickly access these options in the <i>Options</i> menu in the Test Explorer window:</p>
<p><img src="http://jpassing.files.wordpress.com/2010/01/vaoptions.png?w=500" alt="Visual Assert Test Explorer" title="Visual Assert Test Explorer" /></p>
<br />Posted in cfix, Testing, Visual Assert Tagged: cfix, fixture, harness, qa, test, unit testing, unit testing framework, Visual Assert <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=369&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2010/01/24/how-to-cutomize-test-run-execution-to-make-your-cfix-test-runs-more-effective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/07/fixtureexecution_success.png" medium="image">
			<media:title type="html">unit testing</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/07/fixtureexecution_def.png" medium="image">
			<media:title type="html">framework</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/07/fixtureexecution_fsf.png" medium="image">
			<media:title type="html">Short-circuiting the fixture</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/07/fixtureexecution_fsr21.png" medium="image">
			<media:title type="html">Short-circuiting the run</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2010/01/vaoptions.png" medium="image">
			<media:title type="html">Visual Assert Test Explorer</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix finished 2nd in ATI&#8217;s Automation Honors Awards, surpassed only by JUnit</title>
		<link>http://jpassing.com/2009/12/19/cfix-finished-2nd-in-atis-automation-honors-awards/</link>
		<comments>http://jpassing.com/2009/12/19/cfix-finished-2nd-in-atis-automation-honors-awards/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 14:25:13 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[automated test]]></category>
		<category><![CDATA[awards]]></category>
		<category><![CDATA[unit test]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=589</guid>
		<description><![CDATA[Along with JUnit, JWebUnit, NUnit, and SimpleTest, cfix was one of the nominees for the Automated Testing Institute&#8217;s Automation Honors Award 2009 in the category Best Open Source Unit Automated Test Tool. A few days ago, the results were published and cfix finished second &#8212; surpassed only by JUnit, which finished 1st (No real surprise [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=589&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Along with JUnit, JWebUnit, NUnit, and SimpleTest, cfix was one of the nominees for the <a href='http://www.atihonors.automatedtestinginstitute.com/'>Automated Testing Institute&#8217;s Automation Honors Award 2009</a> in the category <i>Best Open Source Unit Automated Test Tool</i>. A few days ago, the results were published and cfix finished second &#8212; surpassed only by JUnit, which finished 1st (No real surprise here). If you are interested, there is a <a href='http://www.automatedtestinginstitute.com/home/index.php?option=com_content&amp;view=article&amp;id=1262&amp;Itemid=131'>video</a> in which the results are presented.</p>
<br />Posted in cfix, Misc Tagged: ati, automated test, awards, cfix, unit test <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/589/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=589&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/12/19/cfix-finished-2nd-in-atis-automation-honors-awards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Assert Beta 3 released</title>
		<link>http://jpassing.com/2009/11/24/visual-assert-beta-3-released/</link>
		<comments>http://jpassing.com/2009/11/24/visual-assert-beta-3-released/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 17:05:27 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[addin]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=542</guid>
		<description><![CDATA[A third beta release of Visual Assert is now available for download on www.visualassert.com. Visual Assert, in case you have not tried it yet, is an Add-In for Visual Studio that adds unit testing capabilities to the Visual C++ IDE: Based on the cfix unit testing framework, Visual Assert allows unit tests to be written, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=542&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A third beta release of <a href='http://www.visualassert.com/'>Visual Assert</a> is now <a href='http://www.visualassert.com/unit-testing-framework/download.html'>available for download on www.visualassert.com</a>.</p>
<p>Visual Assert, in case you have not tried it yet, is an Add-In for Visual Studio that adds unit testing capabilities to the Visual C++ IDE: Based on the <a href='http://www.cfix-testing.org/'>cfix unit testing framework</a>, Visual Assert allows unit tests to be written, run, and debugged from within the IDE. Pretty much like Junit/Eclipse, TestDriven.Net or MSTest, but for real, native code &#8212; code written in C or C++.</p>
<h3>Bugs, bugs, bugs, bugs</h3>
<p>Alas, there were still a few of them in the previous two beta releases. Luckily though, almost all I received from users or found by internal testing were relatively minor in nature. Still, I want Visual Assert to be as high quality as possible and decided to add this third beta release into the schedule and take the time to focus on &#8212; you guessed it &#8212; bugfixing, bugfixing, bugfixing, and bugfixing.</p>
<p>Speaking of bug reports, I have to thank all users of Visual Assert and cfix who reported bugs, suggested new features or provided general feedback. Your input has been, and still is highly appreciated. Although I had to postpone any feature suggestions to a later release, I tried hard to resolve all bugs and have them fixed in this new release.</p>
<h3>Download, Try it, Share Your Opinion</h3>
<p>Of course, using the new Beta version is free. So whether you have already used the previous beta or not, whether you are a unit testing newbie or write unit tests on a daily basis, be sure to give the new version a try. And of course, do not forget to let me know about your feedback, suggestions, found bugs, etc.!</p>
<div style='padding-left:50px;padding-bottom:20px;'>
<p><a href='http://www.visualassert.com/download/VisualAssert_1.0.2.3612.msi'><br />
<b>Download Visual Assert Beta 3</b><br />
Version 1.0.2.3612<br />
</a>
</div>
<br />Posted in cfix, Testing, Tools, Visual Assert Tagged: addin, c, cfix, tdd, Testing, unit testing, Visual Assert, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/542/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/542/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/542/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=542&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/11/24/visual-assert-beta-3-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix 1.5.1 released</title>
		<link>http://jpassing.com/2009/11/07/cfix-1-5-1-released/</link>
		<comments>http://jpassing.com/2009/11/07/cfix-1-5-1-released/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 10:36:28 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[bugfix]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[unittesting]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=543</guid>
		<description><![CDATA[A new version of cfix, the unit testing framework for C and C++ on Windows, is now available on Sourceforge. Despite fixing several minor issues, the new version resolves the following two issues that were reported by users: Definiting multiple WinUnit fixtures with setup/teardown routines in a single .cpp file leads to a compilation error [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=543&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A new version of <a href='http://www.cfix-testing.org/'>cfix, the unit testing framework for C and C++ on Windows</a>, is now available on Sourceforge. Despite fixing several minor issues, the new version resolves the following two issues that were reported by users:</p>
<ul>
<li>Definiting multiple WinUnit fixtures with setup/teardown routines in a single .cpp file leads to a compilation error</li>
<li>A thread handle is leaked during execution of a test (#2889511)</li>
</ul>
<p>Updated binaries and source code are <a href='http://sourceforge.net/projects/cfix/files/'>available for download on Sourceforge</a>.</p>
<p><i>Btw, in case you use cfix for kernel mode testing and are using WDK 7600, please have a look at my previous post: <a href='http://jpassing.wordpress.com/2009/10/21/ltcg-issues-with-the-win7amd64-environment-of-wdk-7600/'>LTCG issues with the WIN7/amd64 environment of WDK 7600</a></i></p>
<br />Posted in cfix, Testing, Tools Tagged: bugfix, cfix, qa, release, unittesting <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/543/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/543/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/543/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=543&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/11/07/cfix-1-5-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>LTCG issues with the WIN7/amd64 environment of WDK 7600</title>
		<link>http://jpassing.com/2009/10/21/ltcg-issues-with-the-win7amd64-environment-of-wdk-7600/</link>
		<comments>http://jpassing.com/2009/10/21/ltcg-issues-with-the-win7amd64-environment-of-wdk-7600/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 07:26:49 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[WDK]]></category>
		<category><![CDATA[ddk]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[ltcg]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=533</guid>
		<description><![CDATA[Now that Windows 7 is out, we all sooner or later have to upgrade to WDK 7600. I am still reluctant to move away from WDK 6000/6001 because of the dropped W2K support, but this is a different issue. However, as one cfix user who has obviously already adopted WDK 7600 kindly pointed out to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=533&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Now that Windows 7 is out, we all sooner or later have to upgrade to WDK 7600. I am still reluctant to move away from WDK 6000/6001 because of the dropped W2K support, but this is a different issue.</p>
<p>However, as one cfix user who has obviously already adopted WDK 7600 kindly pointed out to me, linking a kernel mode unit test against cfix using WDK 7600 and the WIN7/amd64 environment fails reproducibly with the following error message:</p>
<blockquote><p>
error fatal error C1047: The object or library file &#8216;&#8230;\lib\amd64\cfixkdrv.lib&#8217; was created with an older compiler than other objects; rebuild old objects and libraries
</p></blockquote>
<p>In contrast, building the same driver for WIN7/x86 works fine.</p>
<p>As <a href='http://msdn.microsoft.com/en-us/library/ms173554(VS.80).aspx'>the documentation for C1047</a> indicates, this error is usually related to inconsistent usage of Link Time Code Generation (LTCG): As soon as you use LTCG, all objects and libraries must be compiled with /GL &#8212; this normally is not a big deal, but as <a href='http://msdn.microsoft.com/en-us/library/ms794571.aspx'>this WDK page</a> rightfully explains, it means that libraries built this way are not suitable for redistribution because of their dependency on a specific compiler/linker version. But of couse, it also means that a library <i>not</i> built using /GL cannot be used easily when you build your program using LTCG.</p>
<p>Before Windows 7, all WDK build environment configurations I am aware of did not use LTCG. Neither did cfix, so everything worked fine even if your compiler/linker versions did not match the ones used for building cfix.</p>
<p>With WDK 7600, this situation changes: While WLH and other downlevel build environments still do not seem to use LTCG, the WIN7 environment, at least for amd64, enables LTCG by default.</p>
<p>What this means is that as soon as you link against a library which is not part of the WDK and therefore likely to be built using a different compiler version, you&#8217;ll get C1047. It is thus no surprise that attempting to link against cfixkdrv.lib, which is the library all kernel mode unit tests have to link against and which itself has been built using WDK 6000, leads to the error quoted above.</p>
<p>However, once you have figured this out, the workaround for this issue is trivial: Disable LTCG for your test driver by adding the following line to your SOURCES file:</p>
<blockquote><p><code><br />
USER_C_FLAGS=/GL-<br />
</code></p></blockquote>
<p>Link time code generation is a very powerful optimization technique and I encourage everybody to make use of it if possible. However, for the compatibility reasons outlined above, I consider it a rather stupid idea to have the WDK enable LTCG by default. Rather, I had much preferred to see an opt-in switch for LTCG.</p>
<p>Anyway, for the next version, I will consider shipping both, a 7600-compatible LTCG-enabled and a non-LTCG-enabled version of cfixkdrv.lib. Until then, the workaround described above will do the trick.</p>
<br />Posted in cfix, WDK Tagged: ddk, library, ltcg, WDK, win7 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/533/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/533/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/533/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=533&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/10/21/ltcg-issues-with-the-win7amd64-environment-of-wdk-7600/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Assert Beta 2 Released</title>
		<link>http://jpassing.com/2009/09/05/visual-assert-beta-2-released/</link>
		<comments>http://jpassing.com/2009/09/05/visual-assert-beta-2-released/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 10:24:57 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[addin]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test-driven]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=467</guid>
		<description><![CDATA[The Beta 2 release of Visual Assert (formerly named cfix studio) is now available for download. The release marks a major step in the development of Visual Assert for that it not only comprises a number of bugfixes but also introduces major new features. The two most important certainly are support for EXE targets and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=467&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Beta 2 release of <a href='http://www.visualassert.com/'>Visual Assert</a> (formerly named <i>cfix studio</i>) is now <a href='http://www.visualassert.com/unit-testing-framework/download.html'>available for download</a>. The release marks a major step in the development of Visual Assert for that it not only comprises a number of bugfixes but also introduces major new features. The two most important certainly are support for EXE targets and Wizard assistance.</p>
<h3>Support for EXE Targets</h3>
<p>As <a href='/2009/08/06/cfix-studio-beta-2-to-add-support-for-exe-based-unit-tests/'>announced in a previous post</a> and also discussed in the <a href='/2009/09/05/cfix-1-5-released-adds-support-for-exe-embedded-tests-and-kernel-mode-multi-threading/'>post about the cfix 1.5 release</a>, Visual Assert now fully supports unit tets emedded in EXE modules. </p>
<p>Previous releases required all unit tests to be compiled and linked into DLLs. In fact, the usage of DLLs has many advantages and therefore remains the recommended practice. However, for certain projects, such a requirement can turn out to be a true obstacle: Whenever the code to be tested is not exported from a DLL or part of a static library (LIB), accessing this code from within such a test DLL could become quite a challenge.</p>
<p>The fact that Visual Assert Beta 2 now fully supports EXE modules means the following: You can now place your unit tests wherever you think they fit best. Whether they are part of a DLL or an EXE, whether you create separate &#8220;unit test&#8221; projects or intermingle your test code with other code &#8212; it is now all up to you. Wherever you placed your tests, Visual Assert will find them and will provide a consistent user experience. </p>
<p>And the best part of the support for EXE modules is that it is totally non-intrusive: You do not have to change your main/WinMain function, much less any other code or build settings. And when run &#8220;outside&#8221; Visual Assert, i.e. launched directly or in the Visual Studio Debugger, the application will behave as normal.</p>
<p>Needless to say, the cfix 1.5 command line test runners, cfix32.exe and cfix64.exe <a href='/?p=492'>also have been updated</a> to properly deal with EXE modules.</p>
<h3>The Wizard</h3>
<p>Although neither the WinUnit API nor the cfix C and C++ API require much boilerplate code to be written, there still is some amount of code that more or less all unit tests share. Thanks to the new Wizard, you can now have Visual Assert generate this code for you. This <i>really</i> helps creating new fixtures more quickly!</p>
<h3>Download, Try it, Share Your Opinion</h3>
<p>Of course, using the new Beta version is free. So whether you are a full time tester or a unit testing sceptic, download the new release and try it by yourself. And of course, your feedback, both positive and negative, is always welcome and <a href='https://cfix.fogbugz.com/default.asp?pg=pgPublicEdit&amp;ixArea=16'>can be posted here</a>.</p>
<p><b><a href='http://www.visualassert.com/unit-testing-framework/download.html'>Download Visual Assert Beta 2</a></b></p>
<br />Posted in cfix, Testing, Visual Assert, Visual Studio Tagged: addin, cfix, qa, tdd, test-driven, unit testing, Visual Assert, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/467/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=467&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/09/05/visual-assert-beta-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix 1.5 released; adds support for EXE-embedded tests and kernel mode multi-threading</title>
		<link>http://jpassing.com/2009/09/05/cfix-1-5-released-adds-support-for-exe-embedded-tests-and-kernel-mode-multi-threading/</link>
		<comments>http://jpassing.com/2009/09/05/cfix-1-5-released-adds-support-for-exe-embedded-tests-and-kernel-mode-multi-threading/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 10:11:30 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[test-driven]]></category>
		<category><![CDATA[unit test]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[unit testing framework]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=492</guid>
		<description><![CDATA[A new version of the cfix unit testing framework is now ready for download. Unlike the previous release, which was mainly a maintenance release, cfix 1.5 adds major new features: kernel mode multithreading and EXE-based unit tests. EXE based unit tests As I discussed in a previous post in the context of Visual Assert/cfix studio, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=492&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A new version of the <a href='http://www.cfix-testing.org/'>cfix unit testing framework</a> is now ready for download.</p>
<p>Unlike the previous release, which was mainly a maintenance release, cfix 1.5 adds major new features: kernel mode multithreading and EXE-based unit tests.</p>
<h3>EXE based unit tests</h3>
<p>As I <a href='/2009/08/06/cfix-studio-beta-2-to-add-support-for-exe-based-unit-tests/'>discussed in a previous post in the context of Visual Assert/cfix studio</a>, cfix&#8217; restriction to DLL based unit tests has turned out to be quite a limitation for certain kinds of projects. </p>
<p>In cfix 1.5, this restriction has been removed: cfix now supports both, unit tests compiled and linked into DLL modules and unit tests embedded into EXE modules. </p>
<p>Now, when I say <i>embeded into an EXE module</i>, I do not mean that you may merely leave out the /LD compiler switch  &#8212; it means that you may compile and link unit tests <i>into the actual</i> application EXE module <i>without</i> impacting this application&#8217;s behavior or having to change the application&#8217;s main() routine: When you run the application direcly or through the debugger, it will behave as normal (e.g. launch GUI). Once you launch it via <code>cfix32 -exe <i>app.exe</i></code> (or <code>cfix64 -exe <i>app.exe</i></code>, respectively), however, the application&#8217;s main() routine will not execute and instead, your embedded unit tests will run.</p>
<p>This may seem awkward at first &#8212; but it offers a tremendous advantage: <i>All</i> of the application&#8217;s code now immediately becomes testable (i.e. accessible by unit test code) without having to do complex reorganization of your build process or source tree layout (although it is still a very good idea to enhance the build process s.t. the unit tests are stripped in the RTM builds and to make cfix.dll <a href='http://msdn.microsoft.com/en-us/library/yx9zd12s(VS.80).aspx'>a delayload DLL</a>). For many projects, relying on this feature will therefore make adopting cfix and maybe even unit testing in general <i>much</i> easier.</p>
<p>In almost all regards, EXE-embedded unit tests behave the same as their DLL counterparts. They are, however, slightly less handy when it comes to debugging (unless you use <a href='http://www.visualassert.com/'>Visual Assert</a>, which will shield you from this). For this reason, and their greater flexibility in general, it should be noted though that DLL-based unit tests will remain the preferred choice.</p>
<h3>Kernel mode multithreading</h3>
<p>Since its first release, cfix has featured support for multi-threaded test cases. Multi-threaded test cases are tests which spawn child threads and &#8212; and this is the important point &#8212; both, the &#8220;main&#8221; thread and the child threads may trigger assertions (i.e. use CFIX_ASSERT and friends). Regardless of the thread an assertion occurs on, it will be recognized by the framework and will lead to the test case being marked as having failed. In case this sounds trivial to you, be informed that not even JUnit properly supports this :)</p>
<p>And while this feature has been supported for user mode tests ever since, the infrastructure for kernel mode unit tests, which was added in version 1.1, has lacked support for this feature: There was no kernel mode counterpart of <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/CfixCreateThread.html'>CfixCreateThread</a> and thus, only single-threaded kernel mode tests were supported.</p>
<p>cfix 1.5 now finally introduces <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/CfixCreateSystemThread.html'>CfixCreateSystemThread</a>: CfixCreateSystemThread is basically a wrapper for PsCreateSystemThread with the added functionality of registering the child thread with cfix. Thus, all threads spawned using CfixCreateSystemThread (rather than using PsCreateSystemThread directly) are allowed to make use of assertions.</p>
<p><i>Kudos to Matt Oh for beta-testing this feature.</i></p>
<h3>Minor enhacements</h3>
<p>Another enhancement related to multi threaded tests is <i>Auto-joining of child threads</i>: After a test routine completes, the framework will now automatically check whether any child threads were created. If this is the case and any of these threads are still running, they will be waited on &#8212; not before all threads have terminated will the test run resume. This feature both makes writing multi-threaded tests more convenient (you do not have to wait by yourself) and safer (No more runaway child threads).</p>
<p>Finally, another feature worth noting is that by specifying the <code>-td</code> command line switch, cfix can be directed to <i>not</i> capture a stack backtrace when an assertion fails. Although stack backtraces are usually very helpful, the symbol loading can make their creation quite expensive. Using this switch can therefore speed up the usage of cfix.</p>
<h3>Download/Upgrade Now</h3>
<p>You see, there are many good reasons to upgrade your cfix installation or &#8212; in case you are not using cfix yet &#8212; to give cfix a try. </p>
<p>Better yet, check out the <a href='http://www.visualassert.com'>Visual Assert</a> AddIn for Visual C++ &#8212; it is based on the new cfix 1.5 release and seamlessly integrates with Visual Studio.</p>
<p><b><a href='https://sourceforge.net/projects/cfix/files/cfix/cfix%201.5.0/cfix_1.5.0.3535.msi/download'>Download cfix 1.5.0 Installer</a></b><br />
<b><a href='https://sourceforge.net/projects/cfix/files/cfix/cfix%201.5.0/cfix-src-1.5.0.3535.zip/download'>Download cfix 1.5.0 source code</a></b></p>
<br />Posted in cfix, Testing, Win32 Tagged: cfix, download, qa, release, test-driven, unit test, unit testing, unit testing framework <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/492/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/492/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/492/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=492&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/09/05/cfix-1-5-released-adds-support-for-exe-embedded-tests-and-kernel-mode-multi-threading/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix studio renamed to Visual Assert</title>
		<link>http://jpassing.com/2009/09/02/cfix-studio-renamed-to-visual-assert/</link>
		<comments>http://jpassing.com/2009/09/02/cfix-studio-renamed-to-visual-assert/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 18:56:18 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[addin]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=457</guid>
		<description><![CDATA[Back when I began thinking about creating a Visual Studio Add-In for cfix, I needed a code name for the project. After tentatively using the name cfix+ for a while, I quickly settled on cfix studio &#8212; given that the project revolved around cfix and Visual Studio, this name pretty much suggested itself. Soon after [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=457&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Back when I began thinking about creating a Visual Studio Add-In for cfix, I needed a code name for the project. After tentatively using the name <i>cfix+</i> for a while, I quickly settled on <i>cfix studio</i> &#8212; given that the project revolved around cfix and Visual Studio, this name pretty much suggested itself.</p>
<p>Soon after going into Beta, however, I had to realize that this name was not without its problems. Most importantly, it makes it hard for users to properly differentiate between <i>cfix</i> and <i>cfix studio</i>. This obviously led to situations where people were not quite sure whether <i>cfix studio</i> is a supplement to, replacement of, or just new version of <i>cfix</i>.</p>
<p>I would not care too much about this ambiguity if the two projects were not very different in terms of licensing: <del>While using the Add-In will require a license to be purchased once it leaves the beta status</del> While the Add-In is freeware (but not open source), the underlying cfix framework is, and will always remain open source and be licensed under the quite permissive LGPL. </p>
<p>As all APIs and libraries unit tests link against are part of the cfix framework, and the cfix framework itself is self-contained, this means that despite the Add-In being closed source, you still get the benefits of open source: Most importantly, there is no lock-in &#8212; you can stop using the Add-In and switch back to the command line tools at any time and be all-open source again. You are even free to create a fork of cfix at any time &#8212; there really is nothing other than convenience that binds you to using the Add-In.</p>
<p>Given that a growing number of people indeed tends to object to using closed source APIs and fears such vendor lock-in, I consider it important to stress this open source nature of the cfix framework underlying the Add-In. </p>
<p>However, at this point it should also become clear that a name that blurs the distinction between the two projects is counterproductive.</p>
<p>Based on this insight, I opted for dropping the <i>cfix studio</i> name and replacing it by something different: <i>Visual Assert</i>. This name should emphasise that the Add-In may be based on, but really is separate from the cfix framework.</p>
<p><img src="http://jpassing.files.wordpress.com/2009/09/logo-visualassert.gif?w=500" alt="Visual Assert" title="Visual Assert"   class="size-full wp-image-460" align="center" /></p>
<p>The new name will be used beginning with the upcoming Beta 2 release.</p>
<br />Posted in cfix, Testing, Visual Assert, Visual Studio Tagged: addin, Visual Assert, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/457/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=457&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/09/02/cfix-studio-renamed-to-visual-assert/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/09/logo-visualassert.gif" medium="image">
			<media:title type="html">Visual Assert</media:title>
		</media:content>
	</item>
		<item>
		<title>Vote for cfix</title>
		<link>http://jpassing.com/2009/08/23/vote-for-cfix/</link>
		<comments>http://jpassing.com/2009/08/23/vote-for-cfix/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 08:52:49 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=422</guid>
		<description><![CDATA[The Automated Testing Institute has elected cfix to be one of the finalists for the Autmation Honors award. The winners of the award will be highlighted in a Special December Edition of the Automated Software Testing Magazine. If you are a cfix user, be sure to vote for cfix here. And by the way, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=422&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <i>Automated Testing Institute</i> has elected <a href='http://www.cfix-testing.org/'>cfix</a> to be <a href='http://www.automatedtestinginstitute.com/home/index.php?option=com_content&amp;task=view&amp;id=1248'>one of the finalists</a> for the <i>Autmation Honors</i> award. The winners of the award will be highlighted in a Special December Edition of the Automated Software Testing Magazine. </p>
<p>If you are a cfix user, be sure to <a href='http://www.automatedtestinginstitute.com/home/index.php?option=com_mad4joomla&amp;jid=2&amp;Itemid=137'>vote for cfix here</a>.</p>
<p>And by the way, I think <a href='http://grinder.sourceforge.net/'>The Grinder</a>, which is a really neat web performance testing framework, also deserves being voted for&#8230;</p>
<br />Posted in cfix, Misc Tagged: award, cfix, unit testing <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/422/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=422&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/08/23/vote-for-cfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix studio Beta 2 to add support for EXE-based unit tests</title>
		<link>http://jpassing.com/2009/08/06/cfix-studio-beta-2-to-add-support-for-exe-based-unit-tests/</link>
		<comments>http://jpassing.com/2009/08/06/cfix-studio-beta-2-to-add-support-for-exe-based-unit-tests/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 11:16:13 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[addin]]></category>
		<category><![CDATA[cfix studio]]></category>
		<category><![CDATA[mfc]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[unit test]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=398</guid>
		<description><![CDATA[N.B. cfix studio was the code name of what has become Visual Assert The biggest shortcoming of the current cfix studio version certainly is that it requires all tests be implemented in a DLL. Conceptually, keeping test cases separated from the remaining code certainly is a good idea &#8212; and implementing tests in a DLL [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=398&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style='color:red;font-style:italic;padding:20px;'>N.B. cfix studio was the code name of what has become <a href='http://www.visualassert.com/'><b>Visual Assert</b></a></span></p>
<p>The biggest shortcoming of the current cfix studio version certainly is that it requires all tests be implemented in a DLL. Conceptually, keeping test cases separated from the remaining code certainly is a good idea &#8212; and implementing tests in a DLL is a way to accomplish this. However, there are many projects in which such separation is either not feasible or just too much effort.</p>
<p>The good news is that with Beta 2, this will finally change: EXEs become first class-citizens in cfix studio and it will not matter any more whether your tests are part of a DLL or EXE project &#8212; you can just put them where you think is appropriate.</p>
<p>Take a classic MFC/GUI application project as an example: It is pretty common for these kinds of projects that most, if not all, application logic is part of a single Visual Studio project that compiles into a single EXE. There may be some additional DLLs or LIBs, but by and large, the EXE itself is where most of the interesting things happen.</p>
<p>The upcoming Beta 2 release now allows you to implement all your unit tests as part of the same EXE project. This means that your tests have access to all classes, functions and resources that are part of the project &#8212; all of which you would not easily have access to if you implemented the tests in a separate DLL. </p>
<p>Of course, embedding unit tests into an executable raises two questions:</p>
<ol>
<li>
	How to strip the tests from the final release?
</li>
<li>
	How on earth will you be able to run these tests without having main() create windows, load files, play sounds, etc each time?
</li>
</ol>
<p>Thankfully, C/C++ has a preprocessor and Visual C++ has the &#8220;exclude from build&#8221; feature which allows you to exclude certain files whenever the project is built using a specific configuration. Using any of these two features, the first question is easily answered.</p>
<p>The second problem is more tricky &#8212; but thankfully, it has already been solved for you: When cfix studio runs unit tests, it is well aware of that running main() might have, let&#8217;s say <i>interesting</i> effects &#8212; so what it does is simple: It just makes sure that main() is never run! Not only does this ensure that the tests run <i>silently</i>, i.e. without windows popping up etc, it also has the benefit that all unit tests &#8220;see&#8221; the application in a pristine state: Rather than having to worry about which state main() has brought the application into, you can initialize and clean up any state you need in your Setup and Teardown functions<sup>1</sup>. </p>
<p>To make a long story short: You can write unit tests in EXE projects in exactly the same manner as you would in a DLL project. No special considerations needed, no project settings that need to be changed, no additional boilerplate code to write. And when you run the EXE outside cfix studio, i.e. hit F5 in Visual Studio or launch the EXE directly, you will not even notice that the EXE houses some unit tests &#8212; everything works as normal.</p>
<p>Sounds good? Then wait a few more days and see it in action!</p>
<p><b>Remarks</b><br />
1: <i>Needless to say, all global variables are initialized, constructors are run, etc. All CRT initialization happens as normal; only main()/WinMain() is not run. And yes, it also works for apps that link statically to MFC and therefore do not have a &#8220;regular&#8221; WinMain()</i>. </p>
<br />Posted in cfix, Testing, Tools, Visual Assert, Visual Studio, Win32 Tagged: addin, cfix, cfix studio, mfc, qa, Testing, Tools, unit test, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/398/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=398&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/08/06/cfix-studio-beta-2-to-add-support-for-exe-based-unit-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing cfix studio, the Visual Studio AddIn for C/C++ Unit Testing</title>
		<link>http://jpassing.com/2009/06/23/introducing-cfix-studio-the-visual-studio-addin-for-cc-unit-testing/</link>
		<comments>http://jpassing.com/2009/06/23/introducing-cfix-studio-the-visual-studio-addin-for-cc-unit-testing/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 18:32:01 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Assert]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=290</guid>
		<description><![CDATA[N.B. cfix studio was the code name of what has become Visual Assert There is little doubt that native code, and C and C++ in particular, is here to stay. And still, it is pretty obvious that when it comes to tools and IDEs, it is the managed world that has gotten most attention from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=290&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style='color:red;font-style:italic;padding:20px;'>N.B. cfix studio was the code name of what has become <a href='http://www.visualassert.com/'><b>Visual Assert</b></a></span></p>
<p>There is little doubt that native code, and C and C++ in particular, is here to stay. And still, it is pretty obvious that when it comes to tools and IDEs, it is the managed world that has gotten most attention from tool vendors over the past years. </p>
<p>While there are lots and lots of useful tools for native development, many of them probably even better than their managed counterparts, there are some areas where the managed language fraction is far ahead: One of these areas certainly is IDE support for unit testing.</p>
<p>JUnit for Eclipse, TestDriven.Net for Visual Studio and MS Test make test-driven development <i>so much</i> more convenient and efficient that it is almost ridiculous that using command line tools is still state of the art for C/C++ development.</p>
<p>That said, there is great news: With <a href='http://www.cfix-studio.com'>cfix studio</a>, there finally is a solution filling in this gap! cfix studio, <a href='http://jpassing.wordpress.com/2009/06/23/cfix-1-4-released/'>based on the cfix unit testing framework</a>, is a Visual Studio-AddIn that allows you to easily write, manage, run, and debug your unit tests from within Visual Studio. No fiddling with command line tools, complex configuration, or boilerplate code required! </p>
<p>Among <a href='http://www.cfix-studio.com/unit-testing-framework/key-features.html'>lots of other features</a>, cfix studio also has first-class support for multi-architecture development – you can easily switch back and forth between 32-bit and 64-bit and can even mix tests of different architectures in a single test run. Needless to say, cfix studio, like cfix, is also fully compatible to WinUnit. </p>
<p>If that has caught your interest, you are invited to check out the first beta version of cfix studio:</p>
<div style='padding-left:50px;padding-top:20px;padding-bottom:20px;'>
<p><b><a href='http://cfix-studio.com/unit-testing-framework/download.html'>Download cfix studio Beta 1</a></b><br />
Version 1.0.0.3458
</div>
<p>It is free, quick to install and comes with a set of example projects. Give it a try &#8212; and please <a href='https://cfix.fogbugz.com/default.asp?pg=pgPublicEdit&amp;ixArea=16'>let me know about all your crticism, suggestions and other feedback</a>!</p>
<p>Here are some screenshots of cfix studio in action:</p>
<p><a href="http://cfix-studio.com/unit-testing-framework/images/stories/explorer-contextmenu.png"><img src="http://jpassing.files.wordpress.com/2009/06/explorer-contextmenu-thumb.png?w=500" alt="Test Explorer"   class="alignnone size-full wp-image-300" /></a><br />
<i>The Test Explorer allows you to start a single or set of tests, the Run Window shows the results</i></p>
<p><a href='http://cfix-studio.com/unit-testing-framework/images/stories/run-running.png'><img src="http://jpassing.files.wordpress.com/2009/06/run-running-thumb.png?w=500" alt="Run Window" title="Run Window: Viewing test progress"   class="alignnone size-full wp-image-299" /></a><br />
<i>Run Window: Viewing test progress</i></p>
<p><a href="http://cfix-studio.com/unit-testing-framework/images/stories/run-failed-assertion.png"><img src="http://jpassing.files.wordpress.com/2009/06/run-failed-assertion-thumb.png?w=500" alt="Failed Assertion" title="Failed Assertion"   class="alignnone size-full wp-image-303" /></a><br />
<i>Run Window: Viewing test results and details of a failed assertion</i></p>
<p><a href="http://cfix-studio.com/unit-testing-framework/images/stories/debug-failed-assertion.png"><img src="http://jpassing.files.wordpress.com/2009/06/debug-failed-assertion-thumb.png?w=500" alt="Debgging a failed assertion" title="Debgging a failed assertion"   class="alignnone size-full wp-image-294" /></a><br />
<i>When running in the debugger, a failed assertion will hit a breakpoint and the Run Window will show additional details</i></p>
<br />Posted in cfix, Debugging, Testing, Tools, Visual Assert, Visual Studio  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/290/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=290&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/06/23/introducing-cfix-studio-the-visual-studio-addin-for-cc-unit-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/06/explorer-contextmenu-thumb.png" medium="image">
			<media:title type="html">Test Explorer</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/06/run-running-thumb.png" medium="image">
			<media:title type="html">Run Window: Viewing test progress</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/06/run-failed-assertion-thumb.png" medium="image">
			<media:title type="html">Failed Assertion</media:title>
		</media:content>

		<media:content url="http://jpassing.files.wordpress.com/2009/06/debug-failed-assertion-thumb.png" medium="image">
			<media:title type="html">Debgging a failed assertion</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix 1.4 released</title>
		<link>http://jpassing.com/2009/06/23/cfix-1-4-released/</link>
		<comments>http://jpassing.com/2009/06/23/cfix-1-4-released/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 18:27:38 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Win32]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=311</guid>
		<description><![CDATA[Today, a new version of cfix, the open source unit testing framework for user and kernel mode C and C++, has been released. cfix 1.4, in addition to the existing feature of allowing test runs to be restricted to specific fixtures, now also allows single testcases to be run in isolation, which can be a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=311&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today, a new version of cfix, the open source unit testing framework for user and kernel mode C and C++, has been released. cfix 1.4, in addition to the existing feature of allowing test runs to be restricted to specific fixtures, now also allows single testcases to be run in isolation, which can be a great aid in debugging. Besides several minor fixes, the cfix API has been slightly enhanced and cfix now degrades more gracefully in case of dbghelp-issues.</p>
<p>Updated cfix binaries and source code are now <a href='http://sourceforge.net/project/showfiles.php?group_id=218233&amp;package_id=263204'>available for download</a></p>
<br />Posted in cfix, Debugging, Testing, Tools, Win32  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/311/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/311/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=311&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/06/23/cfix-1-4-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix 1.3.0 Released, Introducing WinUnit Compatibility</title>
		<link>http://jpassing.com/2009/03/03/cfix-130-released-introducing-winunit-compatibility/</link>
		<comments>http://jpassing.com/2009/03/03/cfix-130-released-introducing-winunit-compatibility/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 19:52:45 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[winunit]]></category>
		<category><![CDATA[xunit]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=213</guid>
		<description><![CDATA[cfix 1.3, the latest version of the unit testing framework for C/C++ on Windows, has just been released. As announced in the last blog post, the major new feature of this release is WinUnit compatibility, i.e. the ability to recompile existing WinUnit test suites into cfix test suites without having to change a single line [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=213&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>cfix 1.3, the latest version of the unit testing framework for C/C++ on Windows, has just been released. As announced in the <a href='http://jpassing.wordpress.com/2009/02/26/embracing-winunit/'>last blog post</a>, the major new feature of this release is WinUnit compatibility, i.e. the ability to recompile existing WinUnit test suites into cfix test suites without having to change a single line of code.</p>
<p>To demonstrate that this compatibility indeed works, consider the following simple example:</p>
<blockquote><pre>
#include "WinUnit.h"

<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/BEGIN_TEST.html'>BEGIN_TEST</a>(DummyTest)
{
  <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/WIN_ASSERT_STRING_EQUAL.html'>WIN_ASSERT_STRING_EQUAL</a>( "foo", "bar" "Descriptive message");
}
<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/BEGIN_TEST.html'>END_TEST</a>

</pre>
</blockquote>
<p>Compile it:</p>
<blockquote><pre>
cl /I %CFIX_HOME%\include /LD /EHa /Zi winunittest.cpp /link /LIBPATH:%CFIX_HOME%\lib\i386
</pre>
</blockquote>
<p>Or, in case %INCLUDE% and %LIB% already happen to be set properly:</p>
<blockquote><pre>
cl /LD /EHa winunittest.cpp
</pre>
</blockquote>
<p>Note that the only difference to compiling the test for WinUnit ist that a different include path is used &#8212; rather than the original winunit.h, cfix&#8217; own winunit.h is used, which in turn implements the WinUnit API on top of the existing API.</p>
<p>The resulting DLL is a valid cfix DLL and its tests can be run in the usual manner. As the example contains a failing test, cfix will print the stack trace and error description to the console:</p>
<blockquote><pre>
D:\sample&gt;<b>cfix32 -ts -z winunittest.dll</b>
cfix version 1.3.0.3340 (fre)
(C) 2008-2009 - Johannes Passing - http://www.cfix-testing.org/
[Failure]      winunittest.DummyTest.DummyTest
      winunittest.cpp(5): DummyTest

      <b>Expression: Descriptive message: [foo] == [bar] (Expression: "foo" == "bar")</b>
      Last Error: 0 (The operation completed successfully. )

      cfix!CfixpCaptureStackTrace +0x40
      cfix!CfixPeReportFailedAssertion +0xd2
      winunittest!cfixcc::Assertion::Fail&lt;std::...
      winunittest!cfixcc::Assertion::Relate&lt;std...
      winunittest!cfixcc::Assertion::Relate ...
      winunittest!cfixcc::Assertion::RelateStri...
      winunittest!DummyTest +0x9c
      cfix!CfixsRunTestRoutine +0x33
      cfix!CfixsRunTestCaseMethod +0x27
      cfix!CfixsRunTestCase +0x25
      ...
</pre>
</blockquote>
<p>Of course, cfix also supports WinUnit fixtures, as the following example, taken from the original <a href='http://msdn.microsoft.com/en-us/magazine/cc136757.aspx'>WinUnit article on MSDN</a> demonstrates:</p>
<blockquote><pre>
#include "WinUnit.h"
#include &lt;windows.h&gt;

// Fixture must be declared.
<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/FIXTURE.html'>FIXTURE</a>(DeleteFileFixture);

namespace
{
  TCHAR s_tempFileName[MAX_PATH] = _T("");
  bool IsFileValid(TCHAR* fileName);
}

// Both SETUP and TEARDOWN must be present. 
<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/SETUP.html'>SETUP</a>(DeleteFileFixture)
{
  // This is the maximum size of the directory passed to GetTempFileName.
  const unsigned int maxTempPath = MAX_PATH - 14; 
  TCHAR tempPath[maxTempPath + 1] = _T("");
  DWORD charsWritten = GetTempPath(maxTempPath + 1, tempPath);
  // (charsWritten does not include null character)
  <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/WIN_ASSERT_TRUE.html'>WIN_ASSERT_TRUE</a>(charsWritten  0, 
    _T("GetTempPath failed."));

  // Create a temporary file
  UINT tempFileNumber = GetTempFileName(tempPath, _T("WUT"), 
    0, // This means the file will get created and closed.
    s_tempFileName);

  // Make sure that the file actually exists
  WIN_ASSERT_WINAPI_SUCCESS(IsFileValid(s_tempFileName), 
    _T("File %s is invalid or does not exist."), s_tempFileName);
}

// TEARDOWN does the inverse of SETUP, as well as undoing 
// any side effects the tests could have caused.
<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/TEARDOWN.html'>TEARDOWN</a>(DeleteFileFixture)
{
  // Delete the temp file if it still exists.
  if (IsFileValid(s_tempFileName))
  {
    // Ensure file is not read-only
    DWORD fileAttributes = GetFileAttributes(s_tempFileName);
    if (fileAttributes &amp; FILE_ATTRIBUTE_READONLY)
    {
      WIN_ASSERT_WINAPI_SUCCESS(
        SetFileAttributes(s_tempFileName, 
          fileAttributes ^ FILE_ATTRIBUTE_READONLY),
          _T("Unable to undo read-only attribute of file %s."),
          s_tempFileName);
    }

    // Since I'm testing DeleteFile, I use the alternative CRT file
    // deletion function in my cleanup.
    <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/WIN_ASSERT_ZERO.html'>WIN_ASSERT_ZERO</a>(_tremove(s_tempFileName), 
      _T("Unable to delete file %s."), s_tempFileName);
  }

  // Clear the temp file name.
  ZeroMemory(s_tempFileName, 
    ARRAYSIZE(s_tempFileName) * sizeof(s_tempFileName[0]));
}

<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/BEGIN_TESTF.html'>BEGIN_TESTF</a>(DeleteFileShouldDeleteFileIfNotReadOnly, DeleteFileFixture)
{
  WIN_ASSERT_WINAPI_SUCCESS(DeleteFile(s_tempFileName));
  <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/WIN_ASSERT_FALSE.html'>WIN_ASSERT_FALSE</a>(IsFileValid(s_tempFileName), 
    _T("DeleteFile did not delete %s correctly."),
    s_tempFileName);
}
<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/BEGIN_TESTF.html'>END_TESTF</a>

<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/BEGIN_TESTF.html'>BEGIN_TESTF</a>(DeleteFileShouldFailIfFileIsReadOnly, DeleteFileFixture)
{
  // Set file to read-only
  DWORD fileAttributes = GetFileAttributes(s_tempFileName);
  WIN_ASSERT_WINAPI_SUCCESS(
    SetFileAttributes(s_tempFileName, 
    fileAttributes | FILE_ATTRIBUTE_READONLY));

  // Verify that DeleteFile fails with ERROR_ACCESS_DENIED
  // (according to spec)
  <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/WIN_ASSERT_FALSE.html'>WIN_ASSERT_FALSE</a>(DeleteFile(s_tempFileName));
  <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/WIN_ASSERT_EQUAL.html'>WIN_ASSERT_EQUAL</a>(ERROR_ACCESS_DENIED, GetLastError());
}
<a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/BEGIN_TESTF.html'>END_TESTF</a>

namespace
{
  bool IsFileValid(TCHAR* fileName)
  {
    return (GetFileAttributes(fileName) != INVALID_FILE_ATTRIBUTES);
  }
}
</pre>
</blockquote>
<p>Compiling and running this test yields the expected output:</p>
<blockquote><pre>
d:\sample&gt;<b>cl /I %CFIX_HOME%\include /LD /EHa /Zi fixture.cpp /link /LIBPATH:%CFIX_HOME%\lib\i386</b>
d:\sample&gt;<b>cfix32 -ts -z fixture.dll</b>
cfix version 1.3.0.3340 (fre)
(C) 2008-2009 - Johannes Passing - http://www.cfix-testing.org/
[Success]      fixture.DeleteFileFixture.DeleteFileShouldDeleteFileIfNotReadOnly
[Success]      fixture.DeleteFileFixture.DeleteFileShouldFailIfFileIsReadOnly


       1 Fixtures
       2 Test cases
           2 succeeded
           0 failed
           0 inconclusive
</pre>
</blockquote>
<h3>Limitations</h3>
<p>All compatibility has its limitations &#8212; although cfix supports all major WinUnit constructs and assertions, there are a small number of known limitations, which are listed in the documentation. And although I am confident that most WinUnit code should compile and run just fine, it is, of course, possible, that further limitations pop up. In such cases, I would welcome an appropriate bug report and will try to fix cfix accordingly.</p>
<h3>Documentation</h3>
<p>In order to have cfix be a fully adequate replacement for cfix, the <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/API.html'>cfix documentation</a> has additionally been augmented to include a documentation of the entire WinUnit API.</p>
<h3>Technical background</h3>
<p>Technically, implementing the compatibility layer went rather smoothly. On the one hand, WinUnit and cfix have similar architectures, which makes many things easier. On the other hand, WinUnit has a clean, single public header file (contrast that to CppUnit!), which also simplified things. And as WinUnit is limited to C++, I was able to use C++ templates (in combination with some preprocessor macros) to implement the entire WinUnit compatibility layer without having to change a single line of cfix itself. Rather, the WinUnit macros/classes are all mapped onto the existing <a href='http://www.cfix-testing.org/unit-testing-framework/windows/doc/CcAPI.html'>cfix C++ API</a>, which already includes most of what was neccessary to implement the WinUnit functionality. </p>
<h3>Conclusion</h3>
<p>In case have been using WinUnit the past and have a set of existing WinUnit-based test suites, give cfix a try &#8212; Not only should it be a full-featured replacement for WinUnit, you can also expect to see, and benefit from new features in upcoming releases!</p>
<p>Last but not least, the release contains a number of minor bugfixes. So upgrading is recommended even if you do not intend to use the new WinUnit compatibility feature.</p>
<p>cfix can be downloaded <a href='http://sourceforge.net/project/showfiles.php?group_id=218233&amp;package_id=263204'>here</a>.</p>
<br />Posted in cfix, Testing, Tools Tagged: c, cfix, release, unit testing, winunit, xunit <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=213&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2009/03/03/cfix-130-released-introducing-winunit-compatibility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix 1.2 Installer Fixed for AMD64</title>
		<link>http://jpassing.com/2008/11/18/cfix-12-installer-fixed-for-amd64/</link>
		<comments>http://jpassing.com/2008/11/18/cfix-12-installer-fixed-for-amd64/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 11:30:09 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[amd64]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=175</guid>
		<description><![CDATA[The cfix 1.2 package as released last week contained a rather stupid bug that the new build, 1.2.0.3244, now fixes: the amd64 binaries cfix64.exe and cfixkr64.sys were wrongly installed as cfix32.exe and cfixkr32.sys, respectively. Not only did this stand in contrast to what the documenation stated, it also resulted in cfix being unable to load [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=175&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The cfix 1.2 package as released last week contained a rather stupid bug that the new build, 1.2.0.3244, now fixes: the amd64 binaries cfix64.exe and cfixkr64.sys were wrongly installed as cfix32.exe and cfixkr32.sys, respectively. Not only did this stand in contrast to what the documenation stated, it also resulted in cfix being unable to load the cfixkr driver on AMD64 platforms.</p>
<p>The new MSI package is now <a href='https://sourceforge.net/project/showfiles.php?group_id=218233&amp;package_id=263204&amp;release_id=639356'>available for download on Sourceforge</a>.</p>
<br />Posted in cfix, Debugging, Kernel, Testing, Win32 Tagged: amd64, cfix, release <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=175&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2008/11/18/cfix-12-installer-fixed-for-amd64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
		<item>
		<title>cfix 1.2 introduces improved C++ support</title>
		<link>http://jpassing.com/2008/11/10/cfix-12-introduces-improved-c-support/</link>
		<comments>http://jpassing.com/2008/11/10/cfix-12-introduces-improved-c-support/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 10:30:20 +0000</pubDate>
		<dc:creator>jpassing</dc:creator>
				<category><![CDATA[cfix]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[lgpl]]></category>
		<category><![CDATA[oss]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://jpassing.wordpress.com/?p=163</guid>
		<description><![CDATA[cfix 1.2, which has been released today, introduces a number of new features, the most prominent being improved support for C++ and additional execution options. New C++ API To date, cfix has primarily focussed on C as the programming language to write unit tests in. Although C++ has always been supported, cfix has not made [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=163&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>cfix 1.2, which has been released today, introduces a number of new features, the most prominent being improved support for C++ and additional execution options.</p>
<h3>New C++ API</h3>
<p>To date, cfix has primarily focussed on C as the programming language to write unit tests in. Although C++ has always been supported, cfix has not made use of the additional capabilities C++ provides. With version 1.2, cfix makes C++ a first class citizen and introduces an additional API that leverages the benefits of C++ and allows writing test cases in a more convenient manner.</p>
<p>Being implemented on top of the existing C API, the C++ API is not a replacement, but rather an addition to the existing API set.</p>
<p>As the following example suggests, fixtures can now be written as classes, with test cases being implemented as methods:</p>
<blockquote><pre>
#include &lt;cfixcc.h&gt;

class ExampleTest : public <a href="http://cfix.sourceforge.net/doc/TestFixture.html" title="TestFixture">cfixcc::TestFixture</a>
{
public:
  void TestOne() 
  {}
  
  void TestTwo() 
  {}
};

<a href="http://cfix.sourceforge.net/doc/CFIXCC_BEGIN_CLASS.html" title="CFIXCC_BEGIN_CLASS">CFIXCC_BEGIN_CLASS</a>( ExampleTest )
  <a href="http://cfix.sourceforge.net/doc/CFIXCC_METHOD.html" title="CFIXCC_METHOD">CFIXCC_METHOD</a>( TestOne )
  <a href="http://cfix.sourceforge.net/doc/CFIXCC_METHOD.html" title="CFIXCC_METHOD">CFIXCC_METHOD</a>( TestTwo )
<a href="http://cfix.sourceforge.net/doc/CFIXCC_END_CLASS.html" title="CFIXCC_END_CLASS">CFIXCC_END_CLASS</a>()
</pre>
</blockquote>
<p>To learn more about the definition of fixtures, have a look at the <a href='http://cfix.sourceforge.net/doc/TestFixture.html'>respective TestFixture chapter in the cfix documentation</a>.</p>
<p>Regarding the implementation of test cases, cfix adds a new set of <i>type-safe</i>, template-driven assertions that, for instance, allow convenient <a href="http://cfix.sourceforge.net/doc/CFIXCC_ASSERT_EQUALS.html">equality checks</a>:</p>
<blockquote><pre>
void TestOne() 
{
  const wchar_t* testString = L"test";
  
  //
  // Use typesafe assertions...
  //
  <a href="http://cfix.sourceforge.net/doc/CFIXCC_ASSERT_EQUALS.html" title="CFIXCC_ASSERT_EQUALS">CFIXCC_ASSERT_EQUALS</a>( 1, 1 );
  <a href="http://cfix.sourceforge.net/doc/CFIXCC_ASSERT_EQUALS.html" title="CFIXCC_ASSERT_EQUALS">CFIXCC_ASSERT_EQUALS</a>( L"test", testString );
  <a href="http://cfix.sourceforge.net/doc/CFIXCC_ASSERT_EQUALS.html" title="CFIXCC_ASSERT_EQUALS">CFIXCC_ASSERT_EQUALS</a>( wcslen( testString ), ( size_t ) 4 );
  
  //
  // ...log messages...
  //
  <a href="http://cfix.sourceforge.net/doc/CFIX_LOG.html" title="http://cfix.sourceforge.net/doc/CFIX_LOG">CFIX_LOG</a>( L"Test string is %s", testString );
  
  //
  // ...or use the existing "C" assertions.
  //
  <a href="http://cfix.sourceforge.net/doc/CFIX_ASSERT.html" title="CFIX_ASSERT">CFIX_ASSERT</a>( wcslen( testString ) == 4 );
  <a href="http://cfix.sourceforge.net/doc/CFIX_ASSERT_MESSAGE.html" title="CFIX_ASSERT_MESSAGE">CFIX_ASSERT_MESSAGE</a>( testString[ 0 ] == 't', 
    L"Test string should start with a 't'" );
}
</pre>
</blockquote>
<p>Again, have a look at the updated <a href='http://cfix.sourceforge.net/doc/API.html'>API reference</a> for an overview of the new API additions.</p>
<h3>Customizing Test Runs</h3>
<p>Another important new feature is the addition of the new switches -fsf (<i>Shortcut Fixture</i>), -fsr (<i>Shortcut Run</i>), and -fss (<i>Shortcut Run On Failing Setup</i>). Using these switches allows you to specify how a test run should resume when a test case fails.</p>
<p>When a test case fails, the default behavior of cfix is to report the failure, and resume at the next test case. By specifying -fsf, however, the remaining test cases of the same fixture will be skipped and execution resumes at the next fixture. With -fsr, cfix can be requirested to abort the entire run as soon as a single test case fails. </p>
<h3>What else is new in 1.2?</h3>
<ul>
<li><a class="link" href="http://cfix.sourceforge.net/doc/CFIX_ASSERT_MESSAGE.html" title="CFIX_ASSERT_MESSAGE">CFIX_ASSERT_MESSAGE</a></li>
<li>ANSI support for <a class="link" href="http://cfix.sourceforge.net/doc/CFIX_LOG.html" title="CFIX_LOG">CFIX_LOG</a>, <a class="link" href="http://cfix.sourceforge.net/doc/CFIX_INCONCLUSIVE.html" title="CFIX_INCONCLUSIVE">CFIX_INCONCLUSIVE</a>,<br />
					and <a class="link" href="http://cfix.sourceforge.net/doc/CFIX_ASSERT_MESSAGE.html" title="CFIX_ASSERT_MESSAGE">CFIX_ASSERT_MESSAGE</a> (and the entire C++ API)</li>
<li><a class="link" href="http://cfix.sourceforge.net/doc/CfixPeGetValue.html" title="CfixPeGetValue">CfixPeGetValue</a> and <a class="link" href="http://cfix.sourceforge.net/doc/CfixPeSetValue.html" title="CfixPeSetValue">CfixPeSetValue</a></li>
<li>Kernel mode: Drivers do not need to link against aux_klib.lib any more</li>
<li><a class="link" href="http://cfix.sourceforge.net/doc/CFIX_FIXTURE_BEFORE.html" title="CFIX_FIXTURE_BEFORE">Before</a> and <a class="link" href="http://cfix.sourceforge.net/doc/CFIX_FIXTURE_AFTER.html" title="CFIX_FIXTURE_AFTER">After</a> routines</li>
<li>Support for cl 13.00 and Visual Studio 2003 (in addition to 2005 and 2008)</li>
</ul>
<h3>Download</h3>
<p>As always, cfix 1.2 is source and binary compatible to previous versions. The new MSI package and source code can now be <a href='http://sourceforge.net/project/showfiles.php?group_id=218233&amp;package_id=263204'>downloaded on Sourceforge</a>.</p>
<p>cfix is open source and licensed under the <a href='http://www.gnu.org/licenses/lgpl.html'>GNU Lesser General Public License</a>.</p>
<br />Posted in cfix, Debugging, Kernel, Testing, Win32 Tagged: cfix, Kernel, lgpl, oss, release, tdd, unit testing <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jpassing.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jpassing.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jpassing.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jpassing.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jpassing.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jpassing.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jpassing.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jpassing.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jpassing.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jpassing.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jpassing.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jpassing.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jpassing.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jpassing.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jpassing.com&#038;blog=1468393&#038;post=163&#038;subd=jpassing&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jpassing.com/2008/11/10/cfix-12-introduces-improved-c-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2568ab9d93774268403af71d7cadbf11?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jpassing</media:title>
		</media:content>
	</item>
	</channel>
</rss>
