<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2FNightly%2FDevelopers%2FTutorials%2FCxxTests</id>
	<title>Documentation/Nightly/Developers/Tutorials/CxxTests - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2FNightly%2FDevelopers%2FTutorials%2FCxxTests"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/CxxTests&amp;action=history"/>
	<updated>2026-05-05T00:57:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/CxxTests&amp;diff=43091&amp;oldid=prev</id>
		<title>Lasso at 20:57, 26 October 2015</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/CxxTests&amp;diff=43091&amp;oldid=prev"/>
		<updated>2015-10-26T20:57:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:57, 26 October 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot; &gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To reduce the number of individual executable files, typically many test cases are packaged into a single executable using  and CTK's [http://www.commontk.org/docs/html/group__CMakeUtilities.html SIMPLE_TEST utilities]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To reduce the number of individual executable files, typically many test cases are packaged into a single executable using  and CTK's [http://www.commontk.org/docs/html/group__CMakeUtilities.html SIMPLE_TEST utilities]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The test process must exit with zero (EXIT_SUCCESS) error code in case of success and non-zero (EXIT_FAILURE) in case of failure&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The test process must exit with zero (EXIT_SUCCESS) error code in case of success and non-zero (EXIT_FAILURE) in case of failure&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* It is strongly recommended to exit with failure if any unexpected VTK error or warning messages are logged. To achieve this, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;us &lt;/del&gt;the [https://github.com/Slicer/Slicer/blob/master/Libs/vtkAddon/vtkTestingOutputWindow.h vtkTestingOutputWindow] class (and its convenience macros) defined in the vtkAddon library&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* It is strongly recommended to exit with failure if any unexpected VTK error or warning messages are logged. To achieve this, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;use &lt;/ins&gt;the [https://github.com/Slicer/Slicer/blob/master/Libs/vtkAddon/vtkTestingOutputWindow.h vtkTestingOutputWindow] class (and its convenience macros) defined in the vtkAddon library&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** In the CMakeLists.txt of your Cxx tests (see [https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Widgets/Testing/CMakeLists.txt Libs\MRML\Widgets\Testing\CMakeLists.txt] as an example):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** In the CMakeLists.txt of your Cxx tests (see [https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Widgets/Testing/CMakeLists.txt Libs\MRML\Widgets\Testing\CMakeLists.txt] as an example):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** Add ''TESTING_OUTPUT_INIT()'' to ''CMAKE_TESTDRIVER_BEFORE_TESTMAIN''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** Add ''TESTING_OUTPUT_INIT()'' to ''CMAKE_TESTDRIVER_BEFORE_TESTMAIN''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lasso</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/CxxTests&amp;diff=41173&amp;oldid=prev</id>
		<title>Lasso: /* Implementation */</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/CxxTests&amp;diff=41173&amp;oldid=prev"/>
		<updated>2015-03-28T01:57:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Implementation&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 01:57, 28 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot; &gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To reduce the number of individual executable files, typically many test cases are packaged into a single executable using  and CTK's [http://www.commontk.org/docs/html/group__CMakeUtilities.html SIMPLE_TEST utilities]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To reduce the number of individual executable files, typically many test cases are packaged into a single executable using  and CTK's [http://www.commontk.org/docs/html/group__CMakeUtilities.html SIMPLE_TEST utilities]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The test process must exit with zero (EXIT_SUCCESS) error code in case of success and non-zero (EXIT_FAILURE) in case of failure&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The test process must exit with zero (EXIT_SUCCESS) error code in case of success and non-zero (EXIT_FAILURE) in case of failure&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* It is strongly recommended to exit with failure if any unexpected VTK error or warning messages are logged. To achieve this, us the vtkTestingOutputWindow class (and its convenience macros) defined in the vtkAddon library&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* It is strongly recommended to exit with failure if any unexpected VTK error or warning messages are logged. To achieve this, us the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[https://github.com/Slicer/Slicer/blob/master/Libs/vtkAddon/vtkTestingOutputWindow.h &lt;/ins&gt;vtkTestingOutputWindow&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;class (and its convenience macros) defined in the vtkAddon library&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** In the CMakeLists.txt of your Cxx tests (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;See &lt;/del&gt;Libs\MRML\Widgets\Testing\CMakeLists.txt as an example):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** In the CMakeLists.txt of your Cxx tests (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;see [https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Widgets/Testing/CMakeLists.txt &lt;/ins&gt;Libs\MRML\Widgets\Testing\CMakeLists.txt&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;as an example):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** Add TESTING_OUTPUT_INIT()&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;; &lt;/del&gt;to CMAKE_TESTDRIVER_BEFORE_TESTMAIN&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** Add &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;TESTING_OUTPUT_INIT()&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;CMAKE_TESTDRIVER_BEFORE_TESTMAIN&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** Add TESTING_OUTPUT_ASSERT_WARNINGS_ERRORS(0)&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;; &lt;/del&gt;to CMAKE_TESTDRIVER_AFTER_TESTMAIN&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** Add &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;TESTING_OUTPUT_ASSERT_WARNINGS_ERRORS(0)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;CMAKE_TESTDRIVER_AFTER_TESTMAIN&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** Add #include &amp;lt;vtkTestingOutputWindow.h&amp;gt; to the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;include &lt;/del&gt;EXTRA_INCLUDE header file.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** Add &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;#include &amp;lt;vtkTestingOutputWindow.h&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;to the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;included ''&lt;/ins&gt;EXTRA_INCLUDE&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;header file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** In your testing code, if you expect errors or warnings: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;incclude &lt;/del&gt;vtkTestingOutputWindow.h and put code that logs errors or warnings between these macros (see examples in Libs\MRML\Widgets\Testing):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** In your testing code, if you expect errors or warnings: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;include ''&lt;/ins&gt;vtkTestingOutputWindow.h&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;and put code that logs errors or warnings between these macros (see examples in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Widgets/Testing/ &lt;/ins&gt;Libs\MRML\Widgets\Testing&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** TESTING_OUTPUT_IGNORE_WARNINGS_ERRORS_BEGIN() / TESTING_OUTPUT_IGNORE_WARNINGS_ERRORS_END() – if errors or warnings may be logged&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;TESTING_OUTPUT_IGNORE_WARNINGS_ERRORS_BEGIN()&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;/ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;TESTING_OUTPUT_IGNORE_WARNINGS_ERRORS_END()&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;– if errors or warnings may be logged&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** TESTING_OUTPUT_ASSERT_WARNINGS_BEGIN() / TESTING_OUTPUT_ASSERT_WARNINGS_END() – if errors or warnings must be logged&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;TESTING_OUTPUT_ASSERT_WARNINGS_BEGIN()&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;/ &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/ins&gt;TESTING_OUTPUT_ASSERT_WARNINGS_END()&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' &lt;/ins&gt;– if errors or warnings must be logged&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lasso</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/CxxTests&amp;diff=41172&amp;oldid=prev</id>
		<title>Lasso: Created page with '&lt;noinclude&gt;{{documentation/versioncheck}}&lt;/noinclude&gt; == Goal ==  Goal of Cxx tests is to test C++ classes as comprehensively as possible in the simplest possible environment (wi…'</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/CxxTests&amp;diff=41172&amp;oldid=prev"/>
		<updated>2015-03-28T01:51:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt; == Goal ==  Goal of Cxx tests is to test C++ classes as comprehensively as possible in the simplest possible environment (wi…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
Goal of Cxx tests is to test C++ classes as comprehensively as possible in the simplest possible environment (with minimum usage of other classes).&lt;br /&gt;
&lt;br /&gt;
The tests are run as part of the nightly test process and submitted to [http://slicer.cdash.org/index.php?project=Slicer4 the slicer dashboard].&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Test execution is managed by [http://www.cmake.org/Wiki/CMake/Testing_With_CTest CMake/CTest]&lt;br /&gt;
* To reduce the number of individual executable files, typically many test cases are packaged into a single executable using  and CTK's [http://www.commontk.org/docs/html/group__CMakeUtilities.html SIMPLE_TEST utilities]&lt;br /&gt;
* The test process must exit with zero (EXIT_SUCCESS) error code in case of success and non-zero (EXIT_FAILURE) in case of failure&lt;br /&gt;
* It is strongly recommended to exit with failure if any unexpected VTK error or warning messages are logged. To achieve this, us the vtkTestingOutputWindow class (and its convenience macros) defined in the vtkAddon library&lt;br /&gt;
** In the CMakeLists.txt of your Cxx tests (See Libs\MRML\Widgets\Testing\CMakeLists.txt as an example):&lt;br /&gt;
*** Add TESTING_OUTPUT_INIT(); to CMAKE_TESTDRIVER_BEFORE_TESTMAIN&lt;br /&gt;
*** Add TESTING_OUTPUT_ASSERT_WARNINGS_ERRORS(0); to CMAKE_TESTDRIVER_AFTER_TESTMAIN&lt;br /&gt;
*** Add #include &amp;lt;vtkTestingOutputWindow.h&amp;gt; to the include EXTRA_INCLUDE header file.&lt;br /&gt;
** In your testing code, if you expect errors or warnings: incclude vtkTestingOutputWindow.h and put code that logs errors or warnings between these macros (see examples in Libs\MRML\Widgets\Testing):&lt;br /&gt;
*** TESTING_OUTPUT_IGNORE_WARNINGS_ERRORS_BEGIN() / TESTING_OUTPUT_IGNORE_WARNINGS_ERRORS_END() – if errors or warnings may be logged&lt;br /&gt;
*** TESTING_OUTPUT_ASSERT_WARNINGS_BEGIN() / TESTING_OUTPUT_ASSERT_WARNINGS_END() – if errors or warnings must be logged&lt;/div&gt;</summary>
		<author><name>Lasso</name></author>
		
	</entry>
</feed>