Represents a test case for unit testing.
More...
#include <testing.hpp>
|
| TestCase (std::string testCaseName) |
| Constructs a new TestCase object with the given name.
|
|
void | assertIsEqual (const std::string &a, const std::string &b) |
| Asserts that two strings are equal.
|
|
void | assertIsNotEqual (const std::string &a, const std::string &b) |
| Asserts that two strings are not equal.
|
|
void | assertIsEqual (int a, int b) |
| Asserts that two integers are equal.
|
|
void | assertIsNotEqual (int a, int b) |
| Asserts that two integers are not equal.
|
|
void | assertTrue (bool value) |
| Asserts that a boolean value is true.
|
|
void | assertFalse (bool value) |
| Asserts that a boolean value is false.
|
|
void | summarize () const |
| Prints a summary of the test case, including the number of errors encountered.
|
|
|
void | assert (bool condition, const std::string &conditionName) |
| Asserts a given condition and logs the condition name if it fails.
|
|
Represents a test case for unit testing.
◆ TestCase()
steppable::testing::TestCase::TestCase |
( |
std::string | testCaseName | ) |
|
|
explicit |
Constructs a new TestCase object with the given name.
- Parameters
-
[in] | testCaseName | The name of the test case. |
◆ assert()
void steppable::testing::TestCase::assert |
( |
bool | condition, |
|
|
const std::string & | conditionName ) |
|
private |
Asserts a given condition and logs the condition name if it fails.
- Parameters
-
[in] | condition | The condition to be checked. |
[in] | conditionName | The name of the condition. |
◆ assertFalse()
void steppable::testing::TestCase::assertFalse |
( |
bool | value | ) |
|
Asserts that a boolean value is false.
- Parameters
-
[in] | value | The boolean value to be checked. |
◆ assertIsEqual() [1/2]
void steppable::testing::TestCase::assertIsEqual |
( |
const std::string & | a, |
|
|
const std::string & | b ) |
Asserts that two strings are equal.
- Parameters
-
[in] | a | The first string. |
[in] | b | The second string. |
◆ assertIsEqual() [2/2]
void steppable::testing::TestCase::assertIsEqual |
( |
int | a, |
|
|
int | b ) |
Asserts that two integers are equal.
- Parameters
-
[in] | a | The first integer. |
[in] | b | The second integer. |
◆ assertIsNotEqual() [1/2]
void steppable::testing::TestCase::assertIsNotEqual |
( |
const std::string & | a, |
|
|
const std::string & | b ) |
Asserts that two strings are not equal.
- Parameters
-
[in] | a | The first string. |
[in] | b | The second string. |
◆ assertIsNotEqual() [2/2]
void steppable::testing::TestCase::assertIsNotEqual |
( |
int | a, |
|
|
int | b ) |
Asserts that two integers are not equal.
- Parameters
-
[in] | a | The first integer. |
[in] | b | The second integer. |
◆ assertTrue()
void steppable::testing::TestCase::assertTrue |
( |
bool | value | ) |
|
Asserts that a boolean value is true.
- Parameters
-
[in] | value | The boolean value to be checked. |
◆ summarize()
void steppable::testing::TestCase::summarize |
( |
| ) |
const |
Prints a summary of the test case, including the number of errors encountered.
◆ errorCount
int steppable::testing::TestCase::errorCount = 0 |
◆ testCaseName
std::string steppable::testing::TestCase::testCaseName |
|
private |
The documentation for this class was generated from the following files: