|
template<typename T> |
std::string | as_string (const T &val) |
| Gets a value as a string (for debug printing)
|
|
std::string | op_name (const std::string &op) |
| Gets an operation name's output symbol.
|
|
bool | check (bool l) |
| Does a check (used by macros)
|
|
bool | check (bool l, const std::string &) |
| Does a check with a message (drops the message, used by macros)
|
|
std::string | check_msg (bool, std::string message="") |
| Gets the message from a check (used by macros)
|
|
template<typename L, typename R> |
auto | eq (const L &left, const R &right) |
| Equality comparison (used by macros)
|
|
template<typename L, typename R> |
auto | ne (const L &left, const R &right) |
| Inequality comparison (used by macros)
|
|
template<typename L, typename R> |
auto | lt (const L &left, const R &right) |
| Less than comparison (used by macros)
|
|
template<typename L, typename R> |
auto | le (const L &left, const R &right) |
| Less than or equal to comparison (used by macros)
|
|
template<typename L, typename R> |
auto | gt (const L &left, const R &right) |
| Greater than comparison (used by macros)
|
|
template<typename L, typename R> |
auto | ge (const L &left, const R &right) |
| Greater than or equal to comparison (used by macros)
|
|
MT Unit testing framework.
Meant to be small and highly portable, rather than feature rich. Reason for creation comes from the needs of mtstd which has Cheerp support. Cheerp doesn't support variants or unions, so we needed a small test suite to just get things to run inside Cheerp. We built this in a day. We use mttest in both mtstd and mtcore and try to keep it in sync, but there may be some minor differences. We use this to help keep tests easy to port between the two systems (we have the same macros, test structures, etc.). Currently, our goal is to only grow these suites as needed. At some point we may focus on making it a fully mature test suite, but right now we only have it address our needs. We have not focused on making it general purpose.
Need to have exactly one cpp file that defines MTTEST_DEFINE_MAIN
prior to including this file to generate main