Classes | |
class | mockpp::NotImplementedException |
Signal not-yet implemented methods. More... | |
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. | |
#define | MOCKPP_ASSERT_INCLUDES_MESSAGE(msg, a, b) MOCKPP_NS::assertIncludes(__LINE__, __FILE__, msg, a, b) |
Asserts that a string does contain a substring. | |
#define | MOCKPP_ASSERT_INCLUDES(a, b) MOCKPP_NS::assertIncludes(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <in> ") MOCKPP_PCHAR(#b), a, b) |
Asserts that a string does contain a substring. | |
#define | MOCKPP_ASSERT_EXCLUDES_MESSAGE(msg, a, b) MOCKPP_NS::assertExcludes(__LINE__, __FILE__, msg, a, b) |
Asserts that a string does not contain a substring. | |
#define | MOCKPP_ASSERT_EXCLUDES(a, b) MOCKPP_NS::assertExcludes(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <!in> ") MOCKPP_PCHAR(#b), a, b) |
Asserts that a string does not contain a substring. | |
#define | MOCKPP_ASSERT_STARTSWITH_MESSAGE(msg, a, b) MOCKPP_NS::assertStartsWith(__LINE__, __FILE__, msg, a, b) |
Asserts that a string starts with a substring. | |
#define | MOCKPP_ASSERT_STARTSWITH(a, b) MOCKPP_NS::assertStartsWith(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <starts> ") MOCKPP_PCHAR(#b), a, b) |
Asserts that a string starts with a substring. | |
#define | MOCKPP_ASSERT_VERIFYFAILS(obj) MOCKPP_NS::assertVerifyFails(__LINE__, __FILE__, obj) |
Asserts that a verify() of an object fails. | |
#define | MOCKPP_NOT_IMPLEMENTED(msg) MOCKPP_NS::notImplemented(__LINE__, __FILE__, msg) |
Throws unconditionally a NotImplementedException with the given name to indicate a not yet implemented method. | |
#define | MOCKPP_ASSERT_THROWING(action, action_name, except, except_data) |
Asserts that an exception is thrown and that the data is correctly transfered to the catch clause. | |
#define | MOCKPP_ASSERT_THROWING_COND(action, action_name, except, condition) |
Asserts that an exception is thrown and that the data is correctly transfered to the catch clause. | |
#define | MOCKPP_ASSERT_THROWING_EQUALS(action, action_name, except, expected, actual) |
Asserts that an exception is thrown and that the data is correctly transfered to the catch clause. | |
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. | |
mockpp::String | mockpp::number (long n, unsigned base=10) |
Converts a long value into its string representation. | |
mockpp::String | mockpp::number (long long n, unsigned base=10) |
Converts a longlong value into its string representation. | |
mockpp::String | mockpp::number (unsigned long n, unsigned base=10) |
Converts an unsigned long value into its string representation. | |
mockpp::String | mockpp::number (unsigned long long n, unsigned base=10) |
Converts an unsigned long value into its string representation. | |
mockpp::String | mockpp::number (double n, unsigned prec=0) |
Converts an double value into its string representation. | |
mockpp::String | mockpp::number (long double n, unsigned prec=0) |
Converts an long double value into its string representation. | |
String & | mockpp::replaceFormatterString (String &formatter, const String &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const int &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const bool &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const unsigned int &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const unsigned long &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const signed char &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const unsigned char &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const char &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const char *repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const float &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const wchar_t &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const wchar_t *repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const long &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const mockpp::String &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const std::string &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const double &repdata) |
Replace a positional -parameter with a value. | |
mockpp::String & | operator<< (mockpp::String &formatter, const long double &repdata) |
Replace a positional -parameter with a value. | |
void | mockpp::assertExcludes (unsigned srcline, const char *srcfile, const String &description, const std::string &excludeString, const std::string &targetString) |
Asserts that a string does not contain a substring. | |
void | mockpp::assertExcludes (unsigned srcline, const char *srcfile, const String &description, const std::basic_string< wchar_t > &excludeString, const std::basic_string< wchar_t > &targetString) |
Asserts that a string does not contain a substring. | |
void | mockpp::assertIncludes (unsigned srcline, const char *srcfile, const String &description, const std::string &includeString, const std::string &targetString) |
Asserts that a string does contain a substring. | |
void | mockpp::assertIncludes (unsigned srcline, const char *srcfile, const String &description, const std::basic_string< wchar_t > &includeString, const std::basic_string< wchar_t > &targetString) |
Asserts that a string does contain a substring. | |
void | mockpp::assertStartsWith (unsigned srcline, const char *srcfile, const String &description, const std::string &startString, const std::string &targetString) |
Asserts that a string starts with a substring. | |
void | mockpp::assertStartsWith (unsigned srcline, const char *srcfile, const String &description, const std::basic_string< wchar_t > &startString, const std::basic_string< wchar_t > &targetString) |
Asserts that a string starts with a substring. | |
void | mockpp::assertVerifyFails (unsigned srcline, const char *srcfile, Verifiable *aVerifiable) |
Asserts that a verify() of an object fails. | |
void | mockpp::notImplemented (unsigned srcline, const char *srcfile, const String &mockName) |
Throws unconditionally a NotImplementedException with the given name to indicate a not yet implemented method. |
#define MOCKPP_ASSERT_BOUNDARY | ( | lo, | |||
up, | |||||
a | ) |
MOCKPP_NS::assertBoundary(__LINE__, __FILE__, MOCKPP_PCHAR("invalid: ") \ MOCKPP_PCHAR(#lo) MOCKPP_PCHAR(" < ") MOCKPP_PCHAR(#a) \ MOCKPP_PCHAR(" < ") MOCKPP_PCHAR(#up), lo, up, a)
Asserts that two values are equal concerning a delta.
The condition is converted and passed as the according message.
lo | lower boundaray | |
up | upper boundary | |
a | value |
Definition at line 374 of file Asserter.h.
#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.
msg | a human readable description about the cause | |
lo | lower boundaray | |
up | upper boundary | |
a | value |
Definition at line 363 of file Asserter.h.
#define MOCKPP_ASSERT_DELTA | ( | a, | |||
b, | |||||
delta | ) |
MOCKPP_NS::assertDelta(__LINE__, __FILE__, MOCKPP_PCHAR("invalid: ") \ MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" +- ") MOCKPP_PCHAR(#delta) \ MOCKPP_PCHAR(" == ") MOCKPP_PCHAR(#b), a, b, delta)
Asserts that two values are equal concerning a delta.
The condition is converted and passed as the according message.
a | first value | |
b | second value | |
delta | maximal difference a to b |
Definition at line 352 of file Asserter.h.
#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.
msg | a human readable description about the cause | |
a | first value | |
b | second value | |
delta | maximal difference a to b |
Definition at line 341 of file Asserter.h.
#define MOCKPP_ASSERT_EQUALS | ( | a, | |||
b | ) |
MOCKPP_NS::assertEquals(__LINE__, __FILE__, MOCKPP_PCHAR("invalid: ") \ MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" == ") MOCKPP_PCHAR(#b), a, b)
Asserts that two values are equal.
The condition is converted and passed as the according message.
a | first value | |
b | second value |
Definition at line 331 of file Asserter.h.
#define MOCKPP_ASSERT_EQUALS_MESSAGE | ( | msg, | |||
a, | |||||
b | ) | MOCKPP_NS::assertEquals(__LINE__, __FILE__, msg, a, b) |
Asserts that two values are equal.
msg | a human readable description about the cause | |
a | first value | |
b | second value |
Definition at line 321 of file Asserter.h.
#define MOCKPP_ASSERT_EXCLUDES | ( | a, | |||
b | ) | MOCKPP_NS::assertExcludes(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <!in> ") MOCKPP_PCHAR(#b), a, b) |
Asserts that a string does not contain a substring.
If it does it throws an AssertionFailedError with the given infomation. The condition is converted and passed as the according message.
a | string which must occur at the beginning | |
b | string in which is searched |
Definition at line 202 of file AssertMo.h.
#define MOCKPP_ASSERT_EXCLUDES_MESSAGE | ( | msg, | |||
a, | |||||
b | ) | MOCKPP_NS::assertExcludes(__LINE__, __FILE__, msg, a, b) |
Asserts that a string does not contain a substring.
If it does it throws an AssertionFailedError with the given infomation.
msg | a human readable description about the cause | |
a | string which must occur at the beginning | |
b | string in which is searched |
Definition at line 191 of file AssertMo.h.
#define MOCKPP_ASSERT_FALSE | ( | cond | ) | MOCKPP_NS::assertFalse(__LINE__, __FILE__, MOCKPP_PCHAR("!false: ") MOCKPP_PCHAR(#cond), cond) |
Asserts that a condition is false.
The condition is converted and passed as the according message.
cond | boolean condition |
Definition at line 408 of file Asserter.h.
#define MOCKPP_ASSERT_FALSE_MESSAGE | ( | msg, | |||
cond | ) | MOCKPP_NS::assertFalse(__LINE__, __FILE__, msg, cond) |
Asserts that a condition is false.
msg | a human readable description about the cause | |
cond | boolean condition |
Definition at line 399 of file Asserter.h.
#define MOCKPP_ASSERT_INCLUDES | ( | a, | |||
b | ) | MOCKPP_NS::assertIncludes(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <in> ") MOCKPP_PCHAR(#b), a, b) |
Asserts that a string does contain a substring.
If it does not it throws an AssertionFailedError with the given infomation. The condition is converted and passed as the according message.
a | string which must occur at the beginning | |
b | string in which is searched |
Definition at line 182 of file AssertMo.h.
#define MOCKPP_ASSERT_INCLUDES_MESSAGE | ( | msg, | |||
a, | |||||
b | ) | MOCKPP_NS::assertIncludes(__LINE__, __FILE__, msg, a, b) |
Asserts that a string does contain a substring.
If it does not it throws an AssertionFailedError with the given infomation.
msg | a human readable description about the cause | |
a | string which must occur at the beginning | |
b | string in which is searched |
Definition at line 171 of file AssertMo.h.
#define MOCKPP_ASSERT_STARTSWITH | ( | a, | |||
b | ) | MOCKPP_NS::assertStartsWith(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <starts> ") MOCKPP_PCHAR(#b), a, b) |
Asserts that a string starts with a substring.
If it does not it throws an AssertionFailedError with the given infomation. The condition is converted and passed as the according message.
a | string which must occur at the beginning | |
b | string in which is searched |
Definition at line 222 of file AssertMo.h.
#define MOCKPP_ASSERT_STARTSWITH_MESSAGE | ( | msg, | |||
a, | |||||
b | ) | MOCKPP_NS::assertStartsWith(__LINE__, __FILE__, msg, a, b) |
Asserts that a string starts with a substring.
If it does not it throws an AssertionFailedError with the given infomation.
msg | a human readable description about the cause | |
a | string which must occur at the beginning | |
b | string in which is searched |
Definition at line 211 of file AssertMo.h.
#define MOCKPP_ASSERT_THROWING | ( | action, | |||
action_name, | |||||
except, | |||||
except_data | ) |
try \ { \ action; \ MOCKPP_FAIL(MOCKPP_PCHAR("Did not throw the exception: ") + MOCKPP_STRING(action_name)); \ } \ catch(except &exception_object) \ { \ MOCKPP_ASSERT_TRUE(exception_object == except_data); \ } \ catch(MOCKPP_STD_NS::exception &ex) \ { \ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_GET_STRING(ex.what()), false); \ } \ catch(...) \ { \ MOCKPP_FAIL(MOCKPP_PCHAR("Caught unknown exception: ") + MOCKPP_STRING(action_name)); \ }
Asserts that an exception is thrown and that the data is correctly transfered to the catch clause.
MOCKPP_ASSERT_THROWING(object.call(), "default response", MOCKPP_STL::string, MOCKPP_STL::string("throw default"));
action | C++-statement to execute and which is expected to throw | |
action_name | decription for the action | |
except | exception type to be thrown and caught | |
except_data | the exact data the exception contains. |
Definition at line 253 of file AssertMo.h.
#define MOCKPP_ASSERT_THROWING_COND | ( | action, | |||
action_name, | |||||
except, | |||||
condition | ) |
try \ { \ action; \ MOCKPP_FAIL(MOCKPP_PCHAR("Did not throw the exception: ") + MOCKPP_STRING(action_name)); \ } \ catch(except &exception_object) \ { \ MOCKPP_ASSERT_TRUE(condition); \ } \ catch(MOCKPP_STD_NS::exception &ex) \ { \ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_GET_STRING(ex.what()), false); \ } \ catch(...) \ { \ MOCKPP_FAIL(MOCKPP_PCHAR("Caught unknown exception: ") + MOCKPP_STRING(action_name)); \ }
Asserts that an exception is thrown and that the data is correctly transfered to the catch clause.
MOCKPP_ASSERT_THROWING_COND(object.call(), "default response", MOCKPP_STL::string, exception_object.find("throw default") != MOCKPP_STL::string::npos);
action | C++-statement to execute and throw | |
action_name | decription for the action | |
except | exception type to be thrown and caught | |
condition | condition which must be true. The exception object itself can be accessed by reference to exception_object |
Definition at line 287 of file AssertMo.h.
#define MOCKPP_ASSERT_THROWING_EQUALS | ( | action, | |||
action_name, | |||||
except, | |||||
expected, | |||||
actual | ) |
try \ { \ action; \ MOCKPP_FAIL(MOCKPP_PCHAR("Did not throw the exception: ") + MOCKPP_STRING(action_name)); \ } \ catch(except &exception_object) \ { \ MOCKPP_ASSERT_EQUALS(expected, actual); \ } \ catch(std::exception &ex) \ { \ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_GET_STRING(ex.what()), false); \ } \ catch(...) \ { \ MOCKPP_FAIL(MOCKPP_PCHAR("Caught unknown exception: ") + MOCKPP_STRING(action_name)); \ }
Asserts that an exception is thrown and that the data is correctly transfered to the catch clause.
MOCKPP_ASSERT_THROWING_EQUALS(object.call(), "default response", std::string, std::string("except-data", exception.object);
action | C++-statement to execute and throw | |
action_name | decription for the action | |
except | exception type to be thrown and caught | |
expected | the expected value from the exception. The exception object itself can be accessed by reference to exception_object | |
actual | the actual value from the exception |
Definition at line 324 of file AssertMo.h.
#define MOCKPP_ASSERT_TRUE | ( | cond | ) | MOCKPP_NS::assertTrue(__LINE__, __FILE__, MOCKPP_PCHAR("!true: ") MOCKPP_PCHAR(#cond), cond) |
Asserts that a condition is true.
The condition is converted and passed as the according message.
cond | boolean condition |
Definition at line 392 of file Asserter.h.
#define MOCKPP_ASSERT_TRUE_MESSAGE | ( | msg, | |||
cond | ) | MOCKPP_NS::assertTrue(__LINE__, __FILE__, msg, cond) |
Asserts that a condition is true.
msg | a human readable description about the cause | |
cond | boolean condition |
Definition at line 383 of file Asserter.h.
#define MOCKPP_ASSERT_VERIFYFAILS | ( | obj | ) | MOCKPP_NS::assertVerifyFails(__LINE__, __FILE__, obj) |
Asserts that a verify() of an object fails.
If it does not it throws an AssertionFailedError.
obj | object to be verified |
Definition at line 229 of file AssertMo.h.
#define MOCKPP_FAIL | ( | msg | ) | MOCKPP_NS::fail(__LINE__, __FILE__, msg) |
Unconditionally throws an AssertionFailedError.
msg | a human readable description about the cause |
Definition at line 414 of file Asserter.h.
#define MOCKPP_NOT_IMPLEMENTED | ( | msg | ) | MOCKPP_NS::notImplemented(__LINE__, __FILE__, msg) |
Throws unconditionally a NotImplementedException with the given name to indicate a not yet implemented method.
msg | name of the object |
Definition at line 236 of file AssertMo.h.
void mockpp::assertBoundary | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const T & | lo, | |||
const T & | up, | |||
const T & | actual | |||
) | [inline] |
Asserts that a values lies between two boundary values.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
lo | lower boundaray | |
up | upper boundary | |
actual | value |
Definition at line 305 of file Asserter.h.
void mockpp::assertBoundary | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | message, | |||
const T & | lo, | |||
const T & | up, | |||
const T & | actual | |||
) | [inline] |
Asserts that a values lies between two boundary values.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
lo | lower boundaray | |
up | upper boundary | |
actual | value |
Definition at line 287 of file Asserter.h.
void mockpp::assertDelta | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const T & | expected, | |||
const T & | actual, | |||
const T & | delta | |||
) | [inline] |
Asserts that two values are equal concerning a delta.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
expected | the expected value | |
actual | the actual value | |
delta | the maximal difference which is allowed for actual from expected |
Definition at line 270 of file Asserter.h.
void mockpp::assertDelta | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | message, | |||
const T & | expected, | |||
const T & | actual, | |||
const T & | delta | |||
) | [inline] |
Asserts that two values are equal concerning a delta.
If they are not an AssertionFailedError is thrown with the given message.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
expected | the expected value | |
actual | the actual value | |
delta | the maximal difference which is allowed for actual from expected |
Definition at line 249 of file Asserter.h.
void mockpp::assertDelta | ( | unsigned | srcline, | |
const char * | srcfile, | |||
float | expected, | |||
float | actual, | |||
float | delta | |||
) |
Asserts that two floats are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
expected | the expected value | |
actual | the actual value | |
delta | the maximal difference which is allowed for actual from expected |
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.
If they are not an AssertionFailedError is thrown with the given message. If the expected value is infinity then the delta value is ignored.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
expected | the expected value | |
actual | the actual value | |
delta | the maximal difference which is allowed for actual from expected |
void mockpp::assertDelta | ( | unsigned | srcline, | |
const char * | srcfile, | |||
double | expected, | |||
double | actual, | |||
double | delta | |||
) |
Asserts that two doubles are equal concerning a delta.
If the expected value is infinity then the delta value is ignored.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
expected | the expected value | |
actual | the actual value | |
delta | the maximal difference which is allowed for actual from expected |
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.
If they are not an AssertionFailedError is thrown with the given message. If the expected value is infinity then the delta value is ignored.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
expected | the expected value | |
actual | the actual value | |
delta | the maximal difference which is allowed for actual from expected |
void mockpp::assertEquals | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const T & | expected, | |||
const T & | actual | |||
) | [inline] |
Asserts that two values are equal.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
expected | the expected value | |
actual | the actual value |
Definition at line 231 of file Asserter.h.
void mockpp::assertEquals | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | message, | |||
const T & | expected, | |||
const T & | actual | |||
) | [inline] |
Asserts that two values are equal.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
expected | the expected value | |
actual | the actual value |
Definition at line 215 of file Asserter.h.
void mockpp::assertEquals | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const wchar_t * | expected, | |||
const wchar_t * | actual | |||
) |
Asserts that two unicode c-string are equal.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
expected | the expected value | |
actual | the actual value |
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.
If they are not an AssertionFailedError is thrown with the given message.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
expected | the expected value | |
actual | the actual value |
void mockpp::assertEquals | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const char * | expected, | |||
const char * | actual | |||
) |
Asserts that two c-string are equal.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
expected | the expected value | |
actual | the actual value |
void mockpp::assertEquals | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | message, | |||
const char * | expected, | |||
const char * | actual | |||
) |
Asserts that two c-string are equal.
If they are not an AssertionFailedError is thrown with the given message.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
expected | the expected value | |
actual | the actual value |
void mockpp::assertExcludes | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | description, | |||
const std::basic_string< wchar_t > & | excludeString, | |||
const std::basic_string< wchar_t > & | targetString | |||
) |
Asserts that a string does not contain a substring.
If it does anyway it throws an AssertionFailedError with the given infomation.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
description | a human readable description about the cause | |
excludeString | substring which should not occur | |
targetString | string in which is searched |
void mockpp::assertExcludes | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | description, | |||
const std::string & | excludeString, | |||
const std::string & | targetString | |||
) |
Asserts that a string does not contain a substring.
If it does anyway it throws an AssertionFailedError with the given infomation.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
description | a human readable description about the cause | |
excludeString | substring which should not occur | |
targetString | string in which is searched |
void mockpp::assertFalse | ( | unsigned | srcline, | |
const char * | srcfile, | |||
bool | condition | |||
) |
Asserts that a condition is false.
If it isn't it throws an AssertionFailedError.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
condition | if true, an AssertionFailedError is thrown |
void mockpp::assertFalse | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | message, | |||
bool | condition | |||
) |
Asserts that a condition is false.
If it isn't it throws an AssertionFailedError with the given message.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
condition | if true, an AssertionFailedError is thrown |
void mockpp::assertIncludes | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | description, | |||
const std::basic_string< wchar_t > & | includeString, | |||
const std::basic_string< wchar_t > & | targetString | |||
) |
Asserts that a string does contain a substring.
If it does not it throws an AssertionFailedError with the given infomation.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
description | a human readable description about the cause | |
includeString | substring which must occur | |
targetString | string in which is searched |
void mockpp::assertIncludes | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | description, | |||
const std::string & | includeString, | |||
const std::string & | targetString | |||
) |
Asserts that a string does contain a substring.
If it does not it throws an AssertionFailedError with the given infomation.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
description | a human readable description about the cause | |
includeString | substring which must occur | |
targetString | string in which is searched |
void mockpp::assertStartsWith | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | description, | |||
const std::basic_string< wchar_t > & | startString, | |||
const std::basic_string< wchar_t > & | targetString | |||
) |
Asserts that a string starts with a substring.
If it does not it throws an AssertionFailedError with the given infomation.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
description | a human readable description about the cause | |
startString | string which must occur at the beginning | |
targetString | string in which is searched |
void mockpp::assertStartsWith | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | description, | |||
const std::string & | startString, | |||
const std::string & | targetString | |||
) |
Asserts that a string starts with a substring.
If it does not it throws an AssertionFailedError with the given infomation.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
description | a human readable description about the cause | |
startString | string which must occur at the beginning | |
targetString | string in which is searched |
void mockpp::assertTrue | ( | unsigned | srcline, | |
const char * | srcfile, | |||
bool | condition | |||
) |
Asserts that a condition is true.
If it isn't it throws an AssertionFailedError.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
condition | if false, an AssertionFailedError is thrown |
void mockpp::assertTrue | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | message, | |||
bool | condition | |||
) |
Asserts that a condition is true.
If it isn't it throws an AssertionFailedError with the given infomation.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause | |
condition | if false, an AssertionFailedError is thrown |
void mockpp::assertVerifyFails | ( | unsigned | srcline, | |
const char * | srcfile, | |||
Verifiable * | aVerifiable | |||
) |
Asserts that a verify() of an object fails.
If it does not it throws an AssertionFailedError.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
aVerifiable | object to be verified |
void mockpp::fail | ( | unsigned | srcline, | |
const char * | srcfile | |||
) |
Fails a test with no message.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile |
void mockpp::fail | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | message | |||
) |
Fails a test with the given message (AssertionFailedError is thrown).
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
message | a human readable description about the cause |
void mockpp::notImplemented | ( | unsigned | srcline, | |
const char * | srcfile, | |||
const String & | mockName | |||
) |
Throws unconditionally a NotImplementedException with the given name to indicate a not yet implemented method.
srcline | the line in the sourcefile | |
srcfile | the name of the sourcefile | |
mockName | name of the object |
mockpp::String mockpp::number | ( | long double | n, | |
unsigned | prec = 0 | |||
) |
Converts an long double value into its string representation.
n | the actual value | |
prec | the desired precision (amout of significant digits). 0 = minimum required, no trailing zeros. |
mockpp::String mockpp::number | ( | double | n, | |
unsigned | prec = 0 | |||
) |
Converts an double value into its string representation.
n | the actual value | |
prec | the desired precision (amout of significant digits). 0 = minimum required, no trailing zeros. |
mockpp::String mockpp::number | ( | unsigned long long | n, | |
unsigned | base = 10 | |||
) |
Converts an unsigned long value into its string representation.
n | the actual value | |
base | the conversion base from 2 to 36 |
mockpp::String mockpp::number | ( | unsigned long | n, | |
unsigned | base = 10 | |||
) |
Converts an unsigned long value into its string representation.
n | the actual value | |
base | the conversion base from 2 to 36 |
mockpp::String mockpp::number | ( | long long | n, | |
unsigned | base = 10 | |||
) |
Converts a longlong value into its string representation.
n | the actual value | |
base | the conversion base from 2 to 36 |
mockpp::String mockpp::number | ( | long | n, | |
unsigned | base = 10 | |||
) |
Converts a long value into its string representation.
n | the actual value | |
base | the conversion base from 2 to 36 |
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const long double & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 1.234 gives "hello 1.234"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 406 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const double & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 1.234 gives "hello 1.234"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 399 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const std::string & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << "world" gives "hello world"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 415 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const mockpp::String & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << "world" gives "hello world"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 432 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const long & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 9 gives "hello 9"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 392 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const wchar_t * | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. L"hello %1" << L'A' gives L"hello A"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 383 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const wchar_t & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. L"hello %1" << L'A' gives L"hello A"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 376 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const float & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 1.234 gives "hello 1.234"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 367 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const char * | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 'A' gives "hello A"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 360 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const char & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 'A' gives "hello A"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 346 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const unsigned char & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 'A' gives "hello A"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 353 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const signed char & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 'A' gives "hello A"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 339 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const unsigned long & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 9 gives "hello 9"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 332 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const unsigned int & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 9 gives "hello 9"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 325 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const bool & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << true gives "hello 1"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 317 of file Formatter.cpp.
mockpp ::String& operator<< | ( | mockpp::String & | formatter, | |
const int & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << 9 gives "hello 9"
formatter | target string with position parameter | |
repdata | value to replace |
Definition at line 310 of file Formatter.cpp.
String & mockpp::replaceFormatterString | ( | String & | formatter, | |
const String & | repdata | |||
) |
Replace a positional -parameter with a value.
Replaces the lowest -parameter with the string representation of the data. "hello %1" << "world" gives "hello world"
formatter | target string with position parameter | |
repdata | value to replace |