Ticket #6624: ticket6624.patch

File ticket6624.patch, 5.2 KB (added by dtrebbien@…, 11 years ago)

Patch

  • boost/test/impl/test_tools.ipp

    Cannot display: file marked as a binary type.
    svn:mime-type = test/plain
     
    261261        break;
    262262    }
    263263
     264    case CHECK_NE_COLL: {
     265        char const* left_begin_descr    = va_arg( args, char const* );
     266        char const* left_end_descr      = va_arg( args, char const* );
     267        char const* right_begin_descr   = va_arg( args, char const* );
     268        char const* right_end_descr     = va_arg( args, char const* );
     269
     270        os << prefix << "{ " << left_begin_descr  << ", " << left_end_descr  << " } != { "
     271                             << right_begin_descr << ", " << right_end_descr << " }"
     272           << suffix;
     273
     274        if( !pr.has_empty_message() )
     275            os << ". " << pr.message();
     276        break;
     277    }
     278
    264279    case CHECK_BITWISE_EQUAL: {
    265280        char const* left_descr    = va_arg( args, char const* );
    266281        char const* right_descr   = va_arg( args, char const* );
  • boost/test/test_tools.hpp

     
    284284
    285285//____________________________________________________________________________//
    286286
     287#define BOOST_WARN_NE_COLLECTIONS( L_begin, L_end, R_begin, R_end )                  \
     288    BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::ne_coll_impl(),         \
     289        "", WARN, CHECK_NE_COLL, (L_begin)(L_end)(R_begin)(R_end), BOOST_PP_EMPTY() )  \
     290/**/
     291#define BOOST_CHECK_NE_COLLECTIONS( L_begin, L_end, R_begin, R_end )                 \
     292    BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::ne_coll_impl(),         \
     293        "", CHECK, CHECK_NE_COLL, (L_begin)(L_end)(R_begin)(R_end), BOOST_PP_EMPTY() ) \
     294/**/
     295#define BOOST_REQUIRE_NE_COLLECTIONS( L_begin, L_end, R_begin, R_end )               \
     296    BOOST_TEST_TOOL_IMPL( 1, ::boost::test_tools::tt_detail::ne_coll_impl(),         \
     297        "", REQUIRE, CHECK_NE_COLL, (L_begin)(L_end)(R_begin)(R_end), BOOST_PP_EMPTY() )\
     298/**/
     299
     300//____________________________________________________________________________//
     301
    287302#define BOOST_WARN_BITWISE_EQUAL( L, R )    BOOST_TEST_TOOL_IMPL( 1, \
    288303    ::boost::test_tools::tt_detail::bitwise_equal_impl(), "", WARN, CHECK_BITWISE_EQUAL, (L)(R), BOOST_PP_EMPTY() )
    289304#define BOOST_CHECK_BITWISE_EQUAL( L, R )   BOOST_TEST_TOOL_IMPL( 1, \
  • libs/test/doc/src/utf.testing-tools.xml

     
    688688    <para role="first-line-indented">
    689689     These tools are used to perform an element by element comparison of two collections. They print all mismatched
    690690     positions, collection elements at these positions and check that the collections have the same size. The first two
    691      parameters designate begin and end of the first collection. The two parameters designate begin and end of the
     691     parameters designate begin and end of the first collection. The last two parameters designate begin and end of the
    692692     second collection.
    693693    </para>
    694694   
     
    697697    </btl-example>
    698698
    699699    <seealso>
     700     <ref>BOOST_&lt;level&gt;_NE_COLLECTIONS</ref>
    700701     <ref>BOOST_&lt;level&gt;_EQUAL</ref>
    701702    </seealso>
    702703   </refentry>
    703704
     705   <refentry name="BOOST_&lt;level&gt;_NE_COLLECTIONS">
     706    <inline-synopsis>
     707     <macro name="BOOST_WARN_NE_COLLECTIONS" kind="functionlike" ref-id="utf.testing-tools.reference">
     708       <macro-parameter name="left_begin"/>
     709       <macro-parameter name="left_end"/>
     710       <macro-parameter name="right_begin"/>
     711       <macro-parameter name="right_end"/>
     712     </macro>
     713     <macro name="BOOST_CHECK_NE_COLLECTIONS" kind="functionlike" ref-id="utf.testing-tools.reference">
     714       <macro-parameter name="left_begin"/>
     715       <macro-parameter name="left_end"/>
     716       <macro-parameter name="right_begin"/>
     717       <macro-parameter name="right_end"/>
     718     </macro>
     719     <macro name="BOOST_REQUIRE_NE_COLLECTIONS" kind="functionlike" ref-id="utf.testing-tools.reference">
     720       <macro-parameter name="left_begin"/>
     721       <macro-parameter name="left_end"/>
     722       <macro-parameter name="right_begin"/>
     723       <macro-parameter name="right_end"/>
     724     </macro>
     725    </inline-synopsis>
     726
     727    <para role="first-line-indented">
     728     These tools are used to perform a comparison of two collections to check that they are not equal. The first two
     729     parameters designate begin and end of the first collection. The last two parameters designate begin and end of the
     730     second collection.
     731    </para>
     732
     733    <seealso>
     734     <ref>BOOST_&lt;level&gt;_EQUAL_COLLECTIONS</ref>
     735     <ref>BOOST_&lt;level&gt;_NE</ref>
     736    </seealso>
     737   </refentry>
     738
    704739   <refentry name="BOOST_&lt;level&gt;_EXCEPTION">
    705740    <inline-synopsis>
    706741     <macro name="BOOST_WARN_EXCEPTION" kind="functionlike" ref-id="utf.testing-tools.reference">