title: c++ BOOST_TEST not in scope
body: <p>I'm using boost version 1.58</p>
  
  <p>Boost appears to be installed correctly, and the following code compiles and runs correctly (giving an error on the third check):</p>
  
  <pre><code>#define BOOST_TEST_MODULE basics_test
  
  #include &lt;boost/test/included/unit_test.hpp&gt;
  
  BOOST_AUTO_TEST_CASE( basics_test ) {
    BOOST_CHECK(1 == 1);
    BOOST_CHECK(1 + 2 &lt; 4);
    BOOST_CHECK(1 == 2);
  }
  </code></pre>
  
  <p>However, when I attempt to run the second example from the site <a href="http://www.boost.org/doc/libs/1_59_0/libs/test/doc/html/boost_test/testing_tools/boost_test_universal_macro.html" rel="nofollow">http://www.boost.org/doc/libs/1_59_0/libs/test/doc/html/boost_test/testing_tools/boost_test_universal_macro.html</a>, I get the error:</p>
  
  <pre><code>test.cpp: In member function ‘void test_op_reportings::test_method()’:
  test.cpp:20:20: error: ‘BOOST_TEST’ was not declared in this scope
     BOOST_TEST(a == b);
  </code></pre>
  
  <p>When I change each instance of BOOST_TEST to BOOST_CHECK, the code compiles and runs normally.  I'm using g++; when I configure g++ to use c++11 as in <code>g++ -std=c++11 test cpp -o main</code> I get the same error.</p>
  
  <p>How should I go about fixing this?</p>