<commit_before>//  Boost ostream_test_stream_test.cpp  --------------------------------------//

//  (C) Copyright <NAME> 2001.
//  Permission to copy, use, modify, sell and distribute this software is
//  granted provided this copyright notice appears in all copies.
//  This software is provided "as is" without express or implied warranty,
//  and with no claim as to its suitability for any purpose.

//  See http://www.boost.org for updates, documentation, and revision history.

// BTL
#include <boost/test/unit_test_suite_ex.hpp>
#include <boost/test/test_tools.hpp>

using boost::unit_test_framework::test_suite;

#if !defined(BOOST_MSVC) && !defined(__SUNPRO_CC)
// BOOST
#include <boost/bind.hpp>
#endif

#include <boost/function.hpp>
using namespace boost;

// STL
#include <list>

void test0()
{
    BOOST_MESSAGE( "Hello there" );
}

void test1( int arg )
{
    BOOST_CHECK( (arg & 0x80) == 0 );
}

void test2( int arg, int mask )
{
    BOOST_CHECK( (arg & mask) != 0 );
}

struct sub_test_suite : public test_suite {
    sub_test_suite()
    {
        parameters_list.push_back( 1 );
        parameters_list.push_back( 5 );
        parameters_list.push_back( 6 );
        parameters_list.push_back( 7 );
        parameters_list.push_back( 15 );

        masks_list.push_back( 0x01 );
        masks_list.push_back( 0x04 );
        masks_list.push_back( 0x80 );

#if !defined(BOOST_MSVC) && !defined(__SUNPRO_CC)
        for( std::list<int>::iterator it = masks_list.begin(); it != masks_list.end(); ++it ) {
            function1<void,int> fct = bind( &test2, _1, *it );
            add( BOOST_PARAM_TEST_CASE( fct, parameters_list.begin(), parameters_list.end() ) );
        }
#endif

        function1<void,int> fct = &test1;
        add( BOOST_PARAM_TEST_CASE( fct, parameters_list.begin(), parameters_list.end() ) );
    }

    std::list<int> parameters_list;
    std::list<int> masks_list;
};


test_suite*
init_unit_test_suite( int argc, char* argv[] ) {
    test_suite* test = BOOST_TEST_SUITE("ostream_test_stream test");

    function0<void> fct1 = &test0;
    test->add( BOOST_TEST_CASE( fct1 ) );

#if !defined(BOOST_MSVC) && !defined(__SUNPRO_CC)
    function0<void> fct2 = bind( &test2, 12345, 0xcdf );
    test->add( BOOST_TEST_CASE( fct2 ) );
#endif

    test->add( new sub_test_suite, 7 );

    return test;
}

//  Revision History
//  6 Nov 01  Initial  version (<NAME>)

// EOF<commit_msg>Number of exp. errors fixed<commit_after>//  Boost ostream_test_stream_test.cpp  --------------------------------------//

//  (C) Copyright <NAME> 2001.
//  Permission to copy, use, modify, sell and distribute this software is
//  granted provided this copyright notice appears in all copies.
//  This software is provided "as is" without express or implied warranty,
//  and with no claim as to its suitability for any purpose.

//  See http://www.boost.org for updates, documentation, and revision history.

// BTL
#include <boost/test/unit_test_suite_ex.hpp>
#include <boost/test/test_tools.hpp>

using boost::unit_test_framework::test_suite;

#if !defined(BOOST_MSVC) && !defined(__SUNPRO_CC)
// BOOST
#include <boost/bind.hpp>
#endif

#include <boost/function.hpp>
using namespace boost;

// STL
#include <list>

void test0()
{
    BOOST_MESSAGE( "Hello there" );
}

void test1( int arg )
{
    BOOST_CHECK( (arg & 0x80) == 0 );
}

void test2( int arg, int mask )
{
    BOOST_CHECK( (arg & mask) != 0 );
}

struct sub_test_suite : public test_suite {
    sub_test_suite()
    {
        parameters_list.push_back( 1 );
        parameters_list.push_back( 5 );
        parameters_list.push_back( 6 );
        parameters_list.push_back( 7 );
        parameters_list.push_back( 15 );

        masks_list.push_back( 0x01 );
        masks_list.push_back( 0x04 );
        masks_list.push_back( 0x80 );

#if !defined(BOOST_MSVC) && !defined(__SUNPRO_CC)
        for( std::list<int>::iterator it = masks_list.begin(); it != masks_list.end(); ++it ) {
            function1<void,int> fct = bind( &test2, _1, *it );
            add( BOOST_PARAM_TEST_CASE( fct, parameters_list.begin(), parameters_list.end() ) );
        }
#endif

        function1<void,int> fct = &test1;
        add( BOOST_PARAM_TEST_CASE( fct, parameters_list.begin(), parameters_list.end() ) );
    }

    std::list<int> parameters_list;
    std::list<int> masks_list;
};


test_suite*
init_unit_test_suite( int argc, char* argv[] ) {
    test_suite* test = BOOST_TEST_SUITE("ostream_test_stream test");

    function0<void> fct1 = &test0;
    test->add( BOOST_TEST_CASE( fct1 ) );

#if !defined(BOOST_MSVC) && !defined(__SUNPRO_CC)
    function0<void> fct2 = bind( &test2, 12345, 0xcdf );
    test->add( BOOST_TEST_CASE( fct2 ) );
#endif

    test->add( new sub_test_suite
#if !defined(BOOST_MSVC) && !defined(__SUNPRO_CC)
    , 7 
#endif
    );

    return test;
}

//  Revision History
//  6 Nov 01  Initial  version (<NAME>)

// EOF
{'fraction_non_alphanumeric': 0.14732777890672627, 'fraction_numerical': 0.0203210729526519, 'mean_word_length': 3.1326616288832914, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3082346', 'n_tokens_mistral': 1782, 'n_tokens_neox': 1686, 'n_words': 409}