Asserter.h File Reference

Handle assertions. More...

Go to the source code of this file.

Namespaces

namespace  mockpp
 

Namespace for project "Mock Objects for C++".


Defines

#define MOCKPP_ASSERT_EQUALS_MESSAGE(msg, a, b)   MOCKPP_NS::assertEquals(__LINE__, __FILE__, msg, a, b)
 Asserts that two values are equal.
#define MOCKPP_ASSERT_EQUALS(a, b)
 Asserts that two values are equal.
#define MOCKPP_ASSERT_DELTA_MESSAGE(msg, a, b, delta)   MOCKPP_NS::assertDelta(__LINE__, __FILE__, msg, a, b, delta)
 Asserts that two values are equal concerning a delta.
#define MOCKPP_ASSERT_DELTA(a, b, delta)
 Asserts that two values are equal concerning a delta.
#define MOCKPP_ASSERT_BOUNDARY_MESSAGE(msg, lo, up, a)   MOCKPP_NS::assertBoundary(__LINE__, __FILE__, msg, lo, up, a)
 Asserts that a values lies between two boundary values.
#define MOCKPP_ASSERT_BOUNDARY(lo, up, a)
 Asserts that two values are equal concerning a delta.
#define MOCKPP_ASSERT_TRUE_MESSAGE(msg, cond)   MOCKPP_NS::assertTrue(__LINE__, __FILE__, msg, cond)
 Asserts that a condition is true.
#define MOCKPP_ASSERT_TRUE(cond)   MOCKPP_NS::assertTrue(__LINE__, __FILE__, MOCKPP_PCHAR("!true: ") MOCKPP_PCHAR(#cond), cond)
 Asserts that a condition is true.
#define MOCKPP_ASSERT_FALSE_MESSAGE(msg, cond)   MOCKPP_NS::assertFalse(__LINE__, __FILE__, msg, cond)
 Asserts that a condition is false.
#define MOCKPP_ASSERT_FALSE(cond)   MOCKPP_NS::assertFalse(__LINE__, __FILE__, MOCKPP_PCHAR("!false: ") MOCKPP_PCHAR(#cond), cond)
 Asserts that a condition is false.
#define MOCKPP_FAIL(msg)   MOCKPP_NS::fail(__LINE__, __FILE__, msg)
 Unconditionally throws an AssertionFailedError.

Functions

void mockpp::assertTrue (unsigned srcline, const char *srcfile, const String &message, bool condition)
 Asserts that a condition is true.
void mockpp::assertTrue (unsigned srcline, const char *srcfile, bool condition)
 Asserts that a condition is true.
void mockpp::assertFalse (unsigned srcline, const char *srcfile, const String &message, bool condition)
 Asserts that a condition is false.
void mockpp::assertFalse (unsigned srcline, const char *srcfile, bool condition)
 Asserts that a condition is false.
void mockpp::fail (unsigned srcline, const char *srcfile, const String &message)
 Fails a test with the given message (AssertionFailedError is thrown).
void mockpp::fail (unsigned srcline, const char *srcfile)
 Fails a test with no message.
void mockpp::assertDelta (unsigned srcline, const char *srcfile, const String &message, double expected, double actual, double delta)
 Asserts that two doubles are equal concerning a delta.
void mockpp::assertDelta (unsigned srcline, const char *srcfile, double expected, double actual, double delta)
 Asserts that two doubles are equal concerning a delta.
void mockpp::assertDelta (unsigned srcline, const char *srcfile, const String &message, float expected, float actual, float delta)
 Asserts that two floats are equal concerning a delta.
void mockpp::assertDelta (unsigned srcline, const char *srcfile, float expected, float actual, float delta)
 Asserts that two floats are equal concerning a delta.
void mockpp::assertEquals (unsigned srcline, const char *srcfile, const String &message, const char *expected, const char *actual)
 Asserts that two c-string are equal.
void mockpp::assertEquals (unsigned srcline, const char *srcfile, const char *expected, const char *actual)
 Asserts that two c-string are equal.
void mockpp::assertEquals (unsigned srcline, const char *srcfile, const String &message, const wchar_t *expected, const wchar_t *actual)
 Asserts that two unicode c-string are equal.
void mockpp::assertEquals (unsigned srcline, const char *srcfile, const wchar_t *expected, const wchar_t *actual)
 Asserts that two unicode c-string are equal.
template<class T >
void mockpp::assertEquals (unsigned srcline, const char *srcfile, const String &message, const T &expected, const T &actual)
 Asserts that two values are equal.
template<class T >
void mockpp::assertEquals (unsigned srcline, const char *srcfile, const T &expected, const T &actual)
 Asserts that two values are equal.
template<class T >
void mockpp::assertDelta (unsigned srcline, const char *srcfile, const String &message, const T &expected, const T &actual, const T &delta)
 Asserts that two values are equal concerning a delta.
template<class T >
void mockpp::assertDelta (unsigned srcline, const char *srcfile, const T &expected, const T &actual, const T &delta)
 Asserts that two values are equal concerning a delta.
template<class T >
void mockpp::assertBoundary (unsigned srcline, const char *srcfile, const String &message, const T &lo, const T &up, const T &actual)
 Asserts that a values lies between two boundary values.
template<class T >
void mockpp::assertBoundary (unsigned srcline, const char *srcfile, const T &lo, const T &up, const T &actual)
 Asserts that a values lies between two boundary values.

Detailed Description

Handle assertions.

Id
Asserter.h 1491 2010-01-02 22:21:45Z ewald-arnold

Definition in file Asserter.h.

 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:48:57 2010 for mockpp by  doxygen 1.6.1