D:/opendownloadmanager/ODM-1.x/Bittorrent/libtorrent-0.12/test/test.hpp File Reference

Go to the source code of this file.

Defines

#define COUNTER_GUARD(type)
#define TEST_REPORT_AUX(x, line, file)   report_failure(x, line, file)
#define TEST_CHECK(x)
#define TEST_ERROR(x)   TEST_REPORT_AUX((std::string("ERROR: \"") + x + "\"").c_str(), __FILE__, __LINE__)
#define TEST_NOTHROW(x)

Functions

void report_failure (char const *str, char const *file, int line)


Define Documentation

#define COUNTER_GUARD ( type   ) 

Value:

struct BOOST_PP_CAT(type, _counter_guard) \
    { \
        ~BOOST_PP_CAT(type, _counter_guard()) \
        { \
            TEST_CHECK(counted_type<type>::count == 0); \
        } \
    } BOOST_PP_CAT(type, _guard)

Definition at line 9 of file test.hpp.

#define TEST_CHECK (  ) 

Value:

if (!(x)) \
        TEST_REPORT_AUX("TEST_CHECK failed: \"" #x "\"", __FILE__, __LINE__)

Definition at line 22 of file test.hpp.

Referenced by check_client_vec(), run_storage_tests(), test_main(), test_rules_invariant(), and test_transfer().

#define TEST_ERROR (  )     TEST_REPORT_AUX((std::string("ERROR: \"") + x + "\"").c_str(), __FILE__, __LINE__)

Definition at line 26 of file test.hpp.

#define TEST_NOTHROW (  ) 

Value:

try \
        { \
                x; \
        } \
        catch (...) \
        { \
                TEST_ERROR("Exception thrown: " #x); \
        }

Definition at line 29 of file test.hpp.

#define TEST_REPORT_AUX ( x,
line,
file   )     report_failure(x, line, file)

Definition at line 19 of file test.hpp.


Function Documentation

void report_failure ( char const *  str,
char const *  file,
int  line 
)

Definition at line 11 of file main.cpp.

References tests_failure.


Generated on Sun May 25 00:19:43 2008 by  doxygen 1.5.6