mirror of
https://github.com/boostorg/test.git
synced 2026-01-26 19:12:10 +00:00
54 lines
2.3 KiB
HTML
54 lines
2.3 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>Boost Test Library: unit_test_example1 example</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">Examples</A> > <SPAN class="current_article">unit_test_example1</SPAN>
|
|
</DIV>
|
|
<DIV class="body"> <IMG src='../btl.gif' width='252' height='43' alt="Boost Test logo">
|
|
<H1 class="subtitle">The Unit Test Framework example 1</H1>
|
|
<TABLE class="test-example-summary">
|
|
<TR>
|
|
<TD class="title" valign="top">Rationale:</TD>
|
|
<TD>this simple introductory example demonstrate several basic concepts of the unit test framework:
|
|
<UL>
|
|
<LI>usage of init_unit_test_framework to create and initialize test suite</LI>
|
|
<LI>test case creation based on free function</LI>
|
|
<LI>usage of basic test tools in test case</LI>
|
|
<LI>usage of "number of expected failures" feature </LI>
|
|
</UL>
|
|
</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD class="title" valign="top">Input:</TD>
|
|
<TD>This example does not require any input</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD class="title" valign="top">Output:</TD>
|
|
<TD><SPAN class="test-output">Running 1 test case...<BR>
|
|
.../unit_test_example1.cpp(17): error in "free_test_function": test 2 == 1 failed<BR>
|
|
<BR>
|
|
*** No errors detected </SPAN> </TD>
|
|
</TR>
|
|
<TR>
|
|
<TD class="title" valign="top">Source:</TD>
|
|
<TD><A href="../../example/unit_test_example1.cpp">unit_test_example1.cpp</A></TD>
|
|
</TR>
|
|
</TABLE>
|
|
</DIV>
|
|
<DIV class="footer">
|
|
<DIV class="footer-body">
|
|
<P>Copyright © <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>
|