CppUnit project page FAQ CppUnit home page

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TestAssert.h File Reference

#include <cppunit/Portability.h>
#include <cppunit/Exception.h>
#include <string>

Include dependency graph for TestAssert.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  CppUnit
namespace  CppUnit::TestAssert

Defines

#define CPPUNIT_ASSERT(condition)
 A set of macros which allow us to get the line number and file name at the point of an error. More...

#define CPPUNIT_ASSERT_MESSAGE(message, condition)
 Assertion with a user specified message. More...

#define CPPUNIT_ASSERT_EQUAL(expected, actual)
 Equality and string representation can be defined with an appropriate assertion_traits class. More...

#define CPPUNIT_ASSERT_DOUBLES_EQUAL(expected, actual, delta)
 Macro for primitive value comparisons. More...


Define Documentation

#define CPPUNIT_ASSERT condition  
 

Value:

(CppUnit::TestAssert::assertImplementation ((condition),"",\
        __LINE__, __FILE__))
A set of macros which allow us to get the line number and file name at the point of an error.

Just goes to show that preprocessors do have some redeeming qualities.

#define CPPUNIT_ASSERT_DOUBLES_EQUAL expected,
actual,
delta  
 

Value:

(CppUnit::TestAssert::assertEquals ((expected),\
    (actual),(delta),__LINE__,__FILE__))
Macro for primitive value comparisons.

#define CPPUNIT_ASSERT_EQUAL expected,
actual  
 

Value:

(CppUnit::TestAssert::assertEquals ((expected),\
    (actual),__LINE__,__FILE__))
Equality and string representation can be defined with an appropriate assertion_traits class.

A diagnostic is printed if actual and expected values disagree.

#define CPPUNIT_ASSERT_MESSAGE message,
condition  
 

Value:

(CppUnit::TestAssert::assertImplementation( condition, \
                                              message, \
                                              __LINE__, \
                                              __FILE__ ) )
Assertion with a user specified message.

Parameters:
message   Message reported in diagnostic if condition evaluates to false.
condition   If this condition evaluates to false then the test failed.


SourceForge Logo hosts this site. Send comments to:
CppUnit Developers