Clarify determining if macro tests pass

[SVN r59206]
This commit is contained in:
Beman Dawes
2010-01-21 21:08:22 +00:00
parent ca7bd18565
commit 3f50fc1231
2 changed files with 41 additions and 29 deletions

View File

@ -112,8 +112,8 @@ filename limit though. You will also need to provide a function prototype
"`int test()`" that is declared in a namespace with the same name as the macro,
but in all lower case, and which returns zero on success:
namespace boost_no_foo {
namespace boost_no_foo {
int test()
{
// test code goes here:
@ -126,14 +126,18 @@ but in all lower case, and which returns zero on success:
Once the test code is in place in libs/config/test, updating the configuration
test system proceeds as:
* cd into `libs/config/tools` and run `bjam` : this generates the `.cpp`
* cd into `libs/config/tools` and run `bjam`. This generates the `.cpp`
file test cases from the `.ipp` file, updates the
libs/config/test/all/Jamfile.v2, `config_test.cpp` and `config_info.cpp`.
* cd into `libs/config/test/all` and run `bjam `['MACRONAME` compiler-list`] : where
libs/config/test/all/Jamfile.v2, `config_test.cpp` and `config_info.cpp`.[br][br]
* cd into `libs/config/test/all` and run `bjam `['MACRONAME` compiler-list`], where
['MACRONAME] is the name of the new macro, and ['`compiler-list`] is a space separated list of
compilers to test with. You should see the tests pass with those compilers
that don't have the defect, and fail with those that do.
* cd into `libs/config/test` and run `bjam config_info config_test `['`compiler-list`] :
compilers to test with.[br][br]
The xxx_pass_test and the xxx_fail_test [*should both report `**passed**`].[br][br]
If ['MACRONAME] is not defined when it should be defined, xxx_pass_test will not report `**passed**`.
If ['MACRONAME] is defined when it should not be defined, xxx_fail_test will not report `**passed**`.[br][br]
* cd into `libs/config/test` and run `bjam config_info config_test `['`compiler-list`].
`config_info` should build and run cleanly for all the compilers in ['`compiler-list`]
while `config_test` should fail for those that have the defect, and pass for those
that do not.

View File

@ -1,10 +1,11 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Guidelines for Boost Authors</title>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Guidelines for
Boost Authors</title>
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="../index.html" title="Boost.Config">
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="../index.html" title="Boost.Config">
<link rel="up" href="../index.html" title="Boost.Config">
<link rel="prev" href="boost_macro_reference.html" title="Boost Macro Reference">
<link rel="next" href="rationale.html" title="Rationale">
@ -24,7 +25,8 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_config.guidelines_for_boost_authors"></a><a class="link" href="guidelines_for_boost_authors.html" title="Guidelines for Boost Authors">Guidelines for
<a name="boost_config.guidelines_for_boost_authors"></a><a href="guidelines_for_boost_authors.html" title="Guidelines for
Boost Authors">Guidelines for
Boost Authors</a>
</h2></div></div></div>
<div class="toc"><dl>
@ -105,7 +107,8 @@
</ul></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_config.guidelines_for_boost_authors.warnings"></a><a class="link" href="guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.warnings" title="Disabling Compiler Warnings">
<a name="boost_config.guidelines_for_boost_authors.warnings"></a><a href="guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.warnings" title="
Disabling Compiler Warnings">
Disabling Compiler Warnings</a>
</h3></div></div></div>
<p>
@ -184,7 +187,8 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_config.guidelines_for_boost_authors.adding_new_defect_macros"></a><a class="link" href="guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.adding_new_defect_macros" title="Adding New Defect Macros">Adding
<a name="boost_config.guidelines_for_boost_authors.adding_new_defect_macros"></a><a href="guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.adding_new_defect_macros" title="Adding
New Defect Macros">Adding
New Defect Macros</a>
</h3></div></div></div>
<p>
@ -220,7 +224,6 @@
on success:
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost_no_foo</span> <span class="special">{</span>
<span class="keyword">int</span> <span class="identifier">test</span><span class="special">()</span>
<span class="special">{</span>
<span class="comment">// test code goes here:
@ -236,24 +239,27 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
cd into <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">tools</span></code> and run <code class="computeroutput"><span class="identifier">bjam</span></code>
: this generates the <code class="computeroutput"><span class="special">.</span><span class="identifier">cpp</span></code>
cd into <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">tools</span></code> and run <code class="computeroutput"><span class="identifier">bjam</span></code>.
This generates the <code class="computeroutput"><span class="special">.</span><span class="identifier">cpp</span></code>
file test cases from the <code class="computeroutput"><span class="special">.</span><span class="identifier">ipp</span></code> file, updates the libs/config/test/all/Jamfile.v2,
<code class="computeroutput"><span class="identifier">config_test</span><span class="special">.</span><span class="identifier">cpp</span></code> and <code class="computeroutput"><span class="identifier">config_info</span><span class="special">.</span><span class="identifier">cpp</span></code>.
</li>
<code class="computeroutput"><span class="identifier">config_test</span><span class="special">.</span><span class="identifier">cpp</span></code> and <code class="computeroutput"><span class="identifier">config_info</span><span class="special">.</span><span class="identifier">cpp</span></code>.<br><br>
</li>
<li>
cd into <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span><span class="identifier">all</span></code> and run <code class="computeroutput"><span class="identifier">bjam</span>
</code><span class="emphasis"><em>MACRONAME<code class="computeroutput"> <span class="identifier">compiler</span><span class="special">-</span><span class="identifier">list</span></code></em></span>
: where <span class="emphasis"><em>MACRONAME</em></span> is the name of the new macro, and
</code><span class="emphasis"><em>MACRONAME<code class="computeroutput"> <span class="identifier">compiler</span><span class="special">-</span><span class="identifier">list</span></code></em></span>,
where <span class="emphasis"><em>MACRONAME</em></span> is the name of the new macro, and
<span class="emphasis"><em><code class="computeroutput"><span class="identifier">compiler</span><span class="special">-</span><span class="identifier">list</span></code></em></span> is a space separated
list of compilers to test with. You should see the tests pass with those
compilers that don't have the defect, and fail with those that do.
</li>
list of compilers to test with.<br><br> The xxx_pass_test and the
xxx_fail_test <span class="bold"><strong>should both report <code class="computeroutput"><span class="special">**</span><span class="identifier">passed</span><span class="special">**</span></code></strong></span>.<br><br> If <span class="emphasis"><em>MACRONAME</em></span> is not defined when it should
be defined, xxx_pass_test will not report <code class="computeroutput"><span class="special">**</span><span class="identifier">passed</span><span class="special">**</span></code>.
If <span class="emphasis"><em>MACRONAME</em></span> is defined when it should not be defined,
xxx_fail_test will not report <code class="computeroutput"><span class="special">**</span><span class="identifier">passed</span><span class="special">**</span></code>.<br><br>
</li>
<li>
cd into <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">test</span></code> and run <code class="computeroutput"><span class="identifier">bjam</span>
<span class="identifier">config_info</span> <span class="identifier">config_test</span>
</code><span class="emphasis"><em><code class="computeroutput"><span class="identifier">compiler</span><span class="special">-</span><span class="identifier">list</span></code></em></span>
: <code class="computeroutput"><span class="identifier">config_info</span></code> should build
</code><span class="emphasis"><em><code class="computeroutput"><span class="identifier">compiler</span><span class="special">-</span><span class="identifier">list</span></code></em></span>.
<code class="computeroutput"><span class="identifier">config_info</span></code> should build
and run cleanly for all the compilers in <span class="emphasis"><em><code class="computeroutput"><span class="identifier">compiler</span><span class="special">-</span><span class="identifier">list</span></code></em></span>
while <code class="computeroutput"><span class="identifier">config_test</span></code> should
fail for those that have the defect, and pass for those that do not.
@ -283,7 +289,8 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_config.guidelines_for_boost_authors.adding_new_feature_test_macros"></a><a class="link" href="guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.adding_new_feature_test_macros" title="Adding New Feature Test Macros">Adding
<a name="boost_config.guidelines_for_boost_authors.adding_new_feature_test_macros"></a><a href="guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.adding_new_feature_test_macros" title="Adding
New Feature Test Macros">Adding
New Feature Test Macros</a>
</h3></div></div></div>
<p>
@ -307,7 +314,8 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_config.guidelines_for_boost_authors.modifying_the_boost_configuration_headers"></a><a class="link" href="guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.modifying_the_boost_configuration_headers" title="Modifying the Boost Configuration Headers">Modifying
<a name="boost_config.guidelines_for_boost_authors.modifying_the_boost_configuration_headers"></a><a href="guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.modifying_the_boost_configuration_headers" title="Modifying
the Boost Configuration Headers">Modifying
the Boost Configuration Headers</a>
</h3></div></div></div>
<p>
@ -358,7 +366,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <EFBFBD> 2001 -2007 Beman Dawes, Vesa Karvonen, John Maddock<p>
<td align="right"><div class="copyright-footer">Copyright &#169; 2001 -2007 Beman Dawes, Vesa Karvonen, John Maddock<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>