title: Boost.Test: Looking for a working non-Trivial Test Suite Example / Tutorial
body: <p>The <a href="http://www.boost.org/doc/libs/1_34_1/libs/test/doc/index.html" rel="noreferrer">Boost.Test documentation</a> and examples don't really seem to contain any non-trivial examples and so far the two tutorials I've found <a href="http://www.ibm.com/developerworks/aix/library/au-ctools1_boost/" rel="noreferrer">here</a> and <a href="http://us.generation-nt.com/tutorial-c-plus-plus-unit-tests-boost-test-help-12921932.html" rel="noreferrer">here</a> while helpful are both fairly basic.</p>
  
  <p>I would like to have a master test suite for the entire project, while maintaining per module suites of unit tests and fixtures that can be run independently.  I'll also be using a mock server to test various networking edge cases.</p>
  
  <p>I'm on Ubuntu 8.04, but I'll take any example Linux or Windows since I'm writing my own makefiles anyways.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>As a test I did the following:</p>
  
  <pre><code>// test1.cpp
  #define BOOST_TEST_MODULE Regression
  #include &lt;boost/test/included/unit_test.hpp&gt;
  
  BOOST_AUTO_TEST_SUITE(test1_suite)
  
  BOOST_AUTO_TEST_CASE(Test1)
  {
      BOOST_CHECK(2 &lt; 1);
  }
  
  BOOST_AUTO_TEST_SUITE_END()
  
  // test2.cpp
  #include &lt;boost/test/included/unit_test.hpp&gt;
  
  BOOST_AUTO_TEST_SUITE(test2_suite)
  
  BOOST_AUTO_TEST_CASE(Test1)
  {
      BOOST_CHECK(1&lt;2);
  }
  
  BOOST_AUTO_TEST_SUITE_END()
  </code></pre>
  
  <p>Then I compile it:    <code>g++ test1.cpp test2.cpp -o tests</code></p>
  
  <p>This gives me about a bazillion "multiple definition of" errors during linking.</p>
  
  <p>When it's all in a single file it works fine.</p>