Declaration of Tester's API's Object : TestSuite. More...
#include <vector>
#include <string>
#include <sstream>
#include <iostream>
#include "../InternalTest/NRE_InternalTest.hpp"
Go to the source code of this file.
Classes | |
class | NRE::Tester::TestSuite |
Describe the test suite used to store all used-defined test and run them. More... | |
Namespaces | |
NRE | |
The NearlyRealEngine's global namespace. | |
Tester | |
Tester's API. | |
Functions | |
void | NRE::Tester::fail (std::string const &message) |
void | NRE::Tester::fail (const InternalTest *test, std::string const &message) |
void | NRE::Tester::assertTrue (bool assert, std::string const &message) |
void | NRE::Tester::assertTrue (const InternalTest *test, bool assert, std::string const &message) |
void | NRE::Tester::assertFalse (bool assert, std::string const &message) |
void | NRE::Tester::assertFalse (const InternalTest *test, bool assert, std::string const &message) |
template<class T > | |
void | NRE::Tester::assertEquals (T const &lhs, T const &rhs, std::string const &message="Equals Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertEquals (const InternalTest *test, T const &lhs, T const &rhs, std::string const &message="Equals Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertNotEquals (T const &lhs, T const &rhs, std::string const &message="NotEquals Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertNotEquals (const InternalTest *test, T const &lhs, T const &rhs, std::string const &message="NotEquals Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertLesser (T const &lhs, T const &rhs, std::string const &message="Lesser Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertLesser (const InternalTest *test, T const &lhs, T const &rhs, std::string const &message="Lesser Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertGreater (T const &lhs, T const &rhs, std::string const &message="Greater Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertGreater (const InternalTest *test, T const &lhs, T const &rhs, std::string const &message="Greater Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertLesserOrEquals (T const &lhs, T const &rhs, std::string const &message="Lesser or Equals Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertLesserOrEquals (const InternalTest *test, T const &lhs, T const &rhs, std::string const &message="Lesser or Equals Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertGreaterOrEquals (T const &lhs, T const &rhs, std::string const &message="Greater or Equals Assertion Failed") |
template<class T > | |
void | NRE::Tester::assertGreaterOrEquals (const InternalTest *test, T const &lhs, T const &rhs, std::string const &message="Greater or Equals Assertion Failed") |
void | NRE::Tester::assertNull (const void *ptr, std::string const &message) |
void | NRE::Tester::assertNull (const InternalTest *test, const void *ptr, std::string const &message) |
void | NRE::Tester::assertNotNull (const void *ptr, std::string const &message) |
void | NRE::Tester::assertNotNull (const InternalTest *test, const void *ptr, std::string const &message) |
void NRE::Tester::assertEquals | ( | T const & | lhs, |
T const & | rhs, | ||
std::string const & | message = "Equals Assertion Failed" |
||
) |
Except both input to be equals, use the == operator
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertEquals | ( | const InternalTest * | test, |
T const & | lhs, | ||
T const & | rhs, | ||
std::string const & | message = "Equals Assertion Failed" |
||
) |
Except both input to be equals, use the == operator
test | the test for detailed information |
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertFalse | ( | bool | assert, |
std::string const & | message = "False Assertion Failed" |
||
) |
Except a false as input
assert | the assert to test |
message | the message if the assertion fail |
void NRE::Tester::assertFalse | ( | const InternalTest * | test, |
bool | assert, | ||
std::string const & | message = "False Assertion Failed" |
||
) |
Except a false as input
test | the test for detailed information |
assert | the assert to test |
message | the message if the assertion fail |
void NRE::Tester::assertGreater | ( | T const & | lhs, |
T const & | rhs, | ||
std::string const & | message = "Greater Assertion Failed" |
||
) |
Except the first input to be greater than the second, use the > operator
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertGreater | ( | const InternalTest * | test, |
T const & | lhs, | ||
T const & | rhs, | ||
std::string const & | message = "Greater Assertion Failed" |
||
) |
Except the first input to be greater than the second, use the > operator
test | the test for detailed information |
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertGreaterOrEquals | ( | T const & | lhs, |
T const & | rhs, | ||
std::string const & | message = "Greater or Equals Assertion Failed" |
||
) |
Except the first input to be greater than the second, use the >= operator
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertGreaterOrEquals | ( | const InternalTest * | test, |
T const & | lhs, | ||
T const & | rhs, | ||
std::string const & | message = "Greater or Equals Assertion Failed" |
||
) |
Except the first input to be greater than the second, use the >= operator
test | the test for detailed information |
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertLesser | ( | T const & | lhs, |
T const & | rhs, | ||
std::string const & | message = "Lesser Assertion Failed" |
||
) |
Except the first input to be lesser than the second, use the < operator
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertLesser | ( | const InternalTest * | test, |
T const & | lhs, | ||
T const & | rhs, | ||
std::string const & | message = "Lesser Assertion Failed" |
||
) |
Except the first input to be lesser than the second, use the < operator
test | the test for detailed information |
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertLesserOrEquals | ( | T const & | lhs, |
T const & | rhs, | ||
std::string const & | message = "Lesser or Equals Assertion Failed" |
||
) |
Except the first input to be lesser than the second, use the <= operator
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertLesserOrEquals | ( | const InternalTest * | test, |
T const & | lhs, | ||
T const & | rhs, | ||
std::string const & | message = "Lesser or Equals Assertion Failed" |
||
) |
Except the first input to be lesser than the second, use the <= operator
test | the test for detailed information |
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertNotEquals | ( | T const & | lhs, |
T const & | rhs, | ||
std::string const & | message = "NotEquals Assertion Failed" |
||
) |
Except both input to be not equals, use the != operator
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertNotEquals | ( | const InternalTest * | test, |
T const & | lhs, | ||
T const & | rhs, | ||
std::string const & | message = "NotEquals Assertion Failed" |
||
) |
Except both input to be not equals, use the != operator
test | the test for detailed information |
lhs | the left input |
rhs | the right input |
message | the message if the assertion fail |
void NRE::Tester::assertNotNull | ( | const void * | ptr, |
std::string const & | message = "NotNull Assertion Failed" |
||
) |
Except the input to not be a nullptr
ptr | the pointer to test |
message | the message if the assertion fail |
void NRE::Tester::assertNotNull | ( | const InternalTest * | test, |
const void * | ptr, | ||
std::string const & | message = "NotNull Assertion Failed" |
||
) |
Except the input to not be a nullptr
test | the test for detailed information |
ptr | the pointer to test |
message | the message if the assertion fail |
void NRE::Tester::assertNull | ( | const void * | ptr, |
std::string const & | message = "Null Assertion Failed" |
||
) |
Except the input to be a nullptr
ptr | the pointer to test |
message | the message if the assertion fail |
void NRE::Tester::assertNull | ( | const InternalTest * | test, |
const void * | ptr, | ||
std::string const & | message = "Null Assertion Failed" |
||
) |
Except the input to be a nullptr
test | the test for detailed information |
ptr | the pointer to test |
message | the message if the assertion fail |
void NRE::Tester::assertTrue | ( | bool | assert, |
std::string const & | message = "True Assertion Failed" |
||
) |
Except a true as input
assert | the assert to test |
message | the message if the assertion fail |
void NRE::Tester::assertTrue | ( | const InternalTest * | test, |
bool | assert, | ||
std::string const & | message = "True Assertion Failed" |
||
) |
Except a true as input
test | the test for detailed information |
assert | the assert to test |
message | the message if the assertion fail |
void NRE::Tester::fail | ( | std::string const & | message = "Fail" | ) |
Trigger a fail
message | the fail message |
void NRE::Tester::fail | ( | const InternalTest * | test, |
std::string const & | message = "Fail" |
||
) |
Trigger a fail
test | the test for detailed information |
message | the fail message |