Sindbad~EG File Manager
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>FindCxxTest — CMake 3.26.5 Documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="FindCygwin" href="FindCygwin.html" />
<link rel="prev" title="FindCVS" href="FindCVS.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="FindCygwin.html" title="FindCygwin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="FindCVS.html" title="FindCVS"
accesskey="P">previous</a> |</li>
<li>
<img src="../_static/cmake-logo-16.png" alt=""
style="vertical-align: middle; margin-top: -2px" />
</li>
<li>
<a href="https://cmake.org/">CMake</a> »
</li>
<li>
<a href="../index.html">3.26.5 Documentation</a> »
</li>
<li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" accesskey="U">cmake-modules(7)</a> »</li>
<li class="nav-item nav-item-this"><a href="">FindCxxTest</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="findcxxtest">
<span id="module:FindCxxTest"></span><h1>FindCxxTest<a class="headerlink" href="#findcxxtest" title="Permalink to this heading">ΒΆ</a></h1>
<p>Find CxxTest unit testing framework.</p>
<p>Find the CxxTest suite and declare a helper macro for creating unit
tests and integrating them with CTest. For more details on CxxTest
see <a class="reference external" href="https://cxxtest.com">https://cxxtest.com</a></p>
<p>INPUT Variables</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CXXTEST_USE_PYTHON [deprecated since 1.3]
Only used in the case both Python & Perl
are detected on the system to control
which CxxTest code generator is used.
Valid only for CxxTest version 3.
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>NOTE: In older versions of this Find Module,
this variable controlled if the Python test
generator was used instead of the Perl one,
regardless of which scripting language the
user had installed.
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CXXTEST_TESTGEN_ARGS (since CMake 2.8.3)
Specify a list of options to pass to the CxxTest code
generator. If not defined, --error-printer is
passed.
</pre></div>
</div>
<p>OUTPUT Variables</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CXXTEST_FOUND
True if the CxxTest framework was found
CXXTEST_INCLUDE_DIRS
Where to find the CxxTest include directory
CXXTEST_PERL_TESTGEN_EXECUTABLE
The perl-based test generator
CXXTEST_PYTHON_TESTGEN_EXECUTABLE
The python-based test generator
CXXTEST_TESTGEN_EXECUTABLE (since CMake 2.8.3)
The test generator that is actually used (chosen using user preferences
and interpreters found in the system)
CXXTEST_TESTGEN_INTERPRETER (since CMake 2.8.3)
The full path to the Perl or Python executable on the system, on
platforms where the script cannot be executed using its shebang line.
</pre></div>
</div>
<p>MACROS for optional use by CMake users:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CXXTEST_ADD_TEST(<test_name> <gen_source_file> <input_files_to_testgen...>)
Creates a CxxTest runner and adds it to the CTest testing suite
Parameters:
test_name The name of the test
gen_source_file The generated source filename to be
generated by CxxTest
input_files_to_testgen The list of header files containing the
CxxTest::TestSuite's to be included in
this runner
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>#==============
Example Usage:
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>find_package(CxxTest)
if(CXXTEST_FOUND)
include_directories(${CXXTEST_INCLUDE_DIR})
enable_testing()
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> CXXTEST_ADD_TEST(unittest_foo foo_test.cc
${CMAKE_CURRENT_SOURCE_DIR}/foo_test.h)
target_link_libraries(unittest_foo foo) # as needed
endif()
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>This will (if CxxTest is found):
1. Invoke the testgen executable to autogenerate foo_test.cc in the
binary tree from "foo_test.h" in the current source directory.
2. Create an executable and test called unittest_foo.
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>#=============
Example foo_test.h:
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>#include <cxxtest/TestSuite.h>
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>class MyTestSuite : public CxxTest::TestSuite
{
public:
void testAddition( void )
{
TS_ASSERT( 1 + 1 > 1 );
TS_ASSERT_EQUALS( 1 + 1, 2 );
}
};
</pre></div>
</div>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="FindCVS.html"
title="previous chapter">FindCVS</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="FindCygwin.html"
title="next chapter">FindCygwin</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/module/FindCxxTest.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="FindCygwin.html" title="FindCygwin"
>next</a> |</li>
<li class="right" >
<a href="FindCVS.html" title="FindCVS"
>previous</a> |</li>
<li>
<img src="../_static/cmake-logo-16.png" alt=""
style="vertical-align: middle; margin-top: -2px" />
</li>
<li>
<a href="https://cmake.org/">CMake</a> »
</li>
<li>
<a href="../index.html">3.26.5 Documentation</a> »
</li>
<li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" >cmake-modules(7)</a> »</li>
<li class="nav-item nav-item-this"><a href="">FindCxxTest</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2000-2023 Kitware, Inc. and Contributors.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.0.2.
</div>
</body>
</html>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists