2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-26 07:02:12 +00:00
Files
test/doc/components/test_tools/index.html
Gennadiy Rozental 8ee41f3ba4 New Version
[SVN r18711]
2003-06-09 08:07:03 +00:00

69 lines
4.7 KiB
HTML

<HTML>
<HEAD>
<TITLE>The Test Tools</TITLE>
<LINK rel="stylesheet" type="text/css" href="../../style/btl.css" media="screen">
<LINK rel="stylesheet" type="text/css" href="../../style/btl-print.css" media="print">
<META http-equiv="Content-Language" content="en-us">
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<DIV class="header"> <A href="../../index.html">Boost.Test</A> > <A href="../index.html">Components</A>
> <SPAN class="current_article">The Test Tools</SPAN> </DIV>
<DIV class="body"> <IMG src='../../btl.gif' width='252' height='43' alt="Boost Test logo">
<H1>Boost Test Library: The Test Tools</H1>
<P class="page-toc"> <A href="#Introduction">Introduction</A><BR>
<A href="reference/index.html">Reference</A><BR>
<A href="#Implementation">Implementation</A><BR>
<A href="#Examples">Examples and tests</A><BR>
</P>
<H2><A name="Introduction">Introduction</A></H2>
<P class="first_line_indented"> Boost Test Library's Test Tools supply a toolbox to ease a creation
and a maintenance of test programs and provide a uniform error reporting mechanism. The toolbox supplied
in a form of macro and function declarations. While the functions can be called directly, the usual
way to use Test Tools is via convenience macros. All macros arguments are calculated once, so it's
safe to pass complex expressions in their place. All macros provide an error location: a file name
and a line number. Boost Test Library's Test Tools are intended for test code rather than library
or production code, where throwing exceptions, using assert(), or BOOST_STATIC_ASSERT() may be more
suitable ways to detect and report errors. To use the Test Tools you need to link with either the
<A href="../prg_exec_monitor/index.html">Program Execution Monitor</A> or the <A href="../unit_test_framework/index.html">Unit
Test Framework</A>. For list of all supplied Test Tools and usage examples see the <A href="reference/index.html">reference</A>.</P>
<P class="first_line_indented">Among many tools in supplied toolbox, there is the BOOST_CHECK_CLOSE
tool that perform floating point comparison of values. See <A href="floating_point_comparison.html">floating
point comparison</A> page for detailed description of used algorithms.</P>
<P class="first_line_indented">In addition to toolbox, the Test Tools also contains separate ostream_test_stream
tool. This is class designed to significantly simplify correctness testing of the ostream based output
procedures. For detailed description of it's interface and usage see the <A href="output_test_stream.html">ostream_test_stream</A>
page.</P>
<H2><A name="Implementation">Implementation</A></H2>
<P class="first_line_indented">The Test Tools are implemented in three modules: two header files and
one source file. </P>
<H4><A href="../../../../../boost/test/test_tools.hpp">boost/test/test_tools.hpp</A>:</H4>
<P class="first_line_indented">contains definition for the convenience macros, some template based Test
Tools implementation functions and class ostream_test_stream.</P>
<H4><A href="../../../../../boost/test/floating_point_comparison.hpp">Boost/test/floating_point_comparison.hpp</A>:</H4>
<P class="first_line_indented">contains implementation for the floating point comparison algorithms,
used by BOOST_CHECK_CLOSE tool. They also could be used directly.</P>
<H4><A href="../../../src/test_tools.cpp">libs/test/test_tools.cpp</A>:</H4>
<P class="first_line_indented">contains definition for the most Test Tools implementation functions
and class ostream_test_stream implementation.</P>
<P class="first_line_indented">Since this component is not intended to be used standalone, there are
no special compilation instruction for it.</P>
<H2><A name="Examples">Examples and Tests</A></H2>
<P class="indented"><A href="../../examples/test_exec_monitor_example.html">test_exec_example</A><BR>
<A href="../../tests/test_exec_fail2.html">test_exec_fail2</A><BR>
<A href="../../tests/test_exec_fail3.html">test_exec_fail3</A><BR>
<A href="../../tests/test_tools_test.html">test_tools_test</A><BR>
<A href="../../tests/test_fp_comparisons.html">test_fp_comparisons</A> </P>
</DIV>
<DIV class="footer">
<DIV class="footer-body">
<P>Copyright &copy <A href='mailto:rogeeff@emailaccount.com'>Gennadiy Rozental</A> 2001-2003.<BR>
Permission to copy, use, modify, sell and distribute this document is granted provided this copyright
notice appears in all copies. This document is provided "as is" without express or implied warranty
and with no claim as to its suitability for any purpose.</P>
<P>Revised: 9 June, 2003</P>
</DIV>
</DIV>
</BODY>
</HTML>