|
| ASSERT_TRUE (expr, msg=None, logOnSuccess=None) |
| Throw exception if given expression does not evaluate to true.
|
|
| EXPECT_TRUE (expr, msg=None, logOnSuccess=None) |
| Expect given expression to evaluate to true.
|
|
| ASSERT_FALSE (expr, msg=None, logOnSuccess=None) |
| Throw exception if given expression does not evaluate to false.
|
|
| EXPECT_FALSE (expr, msg=None, logOnSuccess=None) |
| Expect given expression to evaluate to false.
|
|
| ASSERT_EQ (expected, actual, msg=None, logOnSuccess=None) |
| Throw exception if given values are not equal.
|
|
| EXPECT_EQ (expected, actual, msg=None, logOnSuccess=None) |
| Expect given values to be equal.
|
|
| ASSERT_NE (expected, actual, msg=None, logOnSuccess=None) |
| Throw exception if given values are equal.
|
|
| EXPECT_NE (expected, actual, msg=None, logOnSuccess=None) |
| Expect given values to be not equal.
|
|
| ASSERT_GT (a, b, msg=None, logOnSuccess=None) |
| Throw exception if first given value is less than or equal to the second.
|
|
| EXPECT_GT (a, b, msg=None, logOnSuccess=None) |
| Expect first given value to be greater than the second.
|
|
| ASSERT_GE (a, b, msg=None, logOnSuccess=None) |
| Throw exception if first given value is less than the second.
|
|
| EXPECT_GE (a, b, msg=None, logOnSuccess=None) |
| Expect first given value to be greater than or equal to the second.
|
|
| ASSERT_LT (a, b, msg=None, logOnSuccess=None) |
| Throw exception if first given value is not less than the second.
|
|
| EXPECT_LT (a, b, msg=None, logOnSuccess=None) |
| Expect first given value to be less than the second.
|
|
| ASSERT_LE (a, b, msg=None, logOnSuccess=None) |
| Throw exception if first given value is not less than or equal to the second.
|
|
| EXPECT_LE (a, b, msg=None, logOnSuccess=None) |
| Expect first given value to be less than or equal to the second.
|
|
| ASSERT_FLOAT_EQ (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None) |
| Throw exception if given values are not equal.
|
|
| EXPECT_FLOAT_EQ (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None) |
| Expect given values to be equal.
|
|
| ASSERT_FLOAT_NE (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None) |
| Throw exception if given values are equal.
|
|
| EXPECT_FLOAT_NE (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None) |
| Expect given values to be not equal.
|
|
| ASSERT_FLOAT_GT (a, b, msg=None, logOnSuccess=None) |
| Throw exception if first given value is not greater than the second.
|
|
| EXPECT_FLOAT_GT (a, b, msg=None, logOnSuccess=None) |
| Expect first given value to be greater than the second.
|
|
| ASSERT_FLOAT_GE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None) |
| Throw exception if first given value is not greater than or equal to the second.
|
|
| EXPECT_FLOAT_GE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None) |
| Expect first given value to be greater than or equal to the second.
|
|
| ASSERT_FLOAT_LT (a, b, msg=None, logOnSuccess=None) |
| Throw exception if first given value is not less than the second.
|
|
| EXPECT_FLOAT_LT (a, b, msg=None, logOnSuccess=None) |
| Expect first given value to be less than the second.
|
|
| ASSERT_FLOAT_LE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None) |
| Throw exception if first given value is not less than or equal to the second.
|
|
| EXPECT_FLOAT_LE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None) |
| Expect first given value to be less than or equal to the second.
|
|
| EXPECT_EMPTY (a, msg=None, logOnSuccess=None) |
| Expect given container to be empty.
|
|
| ASSERT_EMPTY (a, msg=None, logOnSuccess=None) |
| Throw exception if given container is not empty.
|
|
| EXPECT_NOT_EMPTY (a, msg=None, logOnSuccess=None) |
| Expect given container to be not empty.
|
|
| ASSERT_NOT_EMPTY (a, msg=None, logOnSuccess=None) |
| Throw exception if given container is empty.
|
|
| EXPECT_SIZE (a, size, msg=None, logOnSuccess=None) |
| Expect given container to have the given size.
|
|
| ASSERT_SIZE (a, size, msg=None, logOnSuccess=None) |
| Throw exception if given container does not have the given size.
|
|
| EXPECT_PATH_EXISTS (path, msg=None, logOnSuccess=None) |
| Expect the given path to exist.
|
|
| EXPECT_PATH_MISSING (path, msg=None, logOnSuccess=None) |
| Expect the given path to be missing, i.e.
|
|
| ASSERT_PATH_EXISTS (path, msg=None, logOnSuccess=None) |
| Throw exception if given path does not exists.
|
|
| ASSERT_PATH_MISSING (path, msg=None, logOnSuccess=None) |
| Throw exception if given path is not missing, i.e.
|
|
| INFO (msg) |
| Create an info message.
|
|
| WARNING (msg) |
| Create a warning message.
|
|
| ERROR (msg) |
| Create an error message.
|
|
| DEBUG_STOP () |
| Stops a test immediately for debugging purposes.
|
|
Adds GoogleTest like methods.
GoogleTest has a set of macros to be used for testing. These methods are all written in upper case which helps identifying the relevant parts of a test function. This module add similar methods but note that the piping feature used in GoogleTest is not available in Python and therefore additional user information must be appended as method argument. This does not mean a restriction as piping is used as string concatenation in C++ is way harder than in Python.
By default, all macros log an info message if the assertion or expectation succeeds. This can be disabled for each call of a macro by passing logOnSuccess=False. It can also be disabled for a single test function by using the TestSupport.Base.MacrosShouldLogOnSuccessDecorator. And finally it can also be disabled by calling TestSupport.Base.setMacrosShouldLogOnSuccess in the setUpTestCase() method. It does not have to be reset, because the TestCenter enables it before each TestCase.