gem5
|
Go to the source code of this file.
Namespaces | |
UnitTest | |
Macros | |
#define | EXPECT_TRUE(expr) UnitTest::checkVal(__FILE__, __LINE__, "EXPECT_TRUE(" #expr ")", (expr)) |
A macro which verifies that expr evaluates to true. More... | |
#define | EXPECT_FALSE(expr) |
A macro which verifies that expr evaluates to false. More... | |
#define | EXPECT_EQ(lhs, rhs) |
A macro which verifies that lhs and rhs are equal to each other. More... | |
Functions | |
void | UnitTest::checkVal (const char *file, const unsigned line, const char *test, const bool result) |
Function that actually handles checking whether an EXPECT_* passed. More... | |
bool | UnitTest::printOnPass () |
Print on pass is a switch that specifies whether to print a message even when a check passes. More... | |
void | UnitTest::printOnPass (bool newVal) |
Function for setting print on pass. More... | |
unsigned | UnitTest::passes () |
Function that returns the current number of passed checks. More... | |
unsigned | UnitTest::failures () |
Function that returns the current number of failed checks. More... | |
unsigned | UnitTest::printResults () |
Function to call at the end of a test that prints an overall result and a summary of how many checks passed and failed. More... | |
void | UnitTest::reset () |
Zero the number of passes and failures so far. More... | |
void | UnitTest::setCase (const char *newCase) |
Sets the current test case. More... | |
#define EXPECT_EQ | ( | lhs, | |
rhs | |||
) |
A macro which verifies that lhs and rhs are equal to each other.
Definition at line 112 of file unittest.hh.
Referenced by main().
#define EXPECT_FALSE | ( | expr | ) |
A macro which verifies that expr evaluates to false.
Definition at line 108 of file unittest.hh.
#define EXPECT_TRUE | ( | expr | ) | UnitTest::checkVal(__FILE__, __LINE__, "EXPECT_TRUE(" #expr ")", (expr)) |
A macro which verifies that expr evaluates to true.
Definition at line 105 of file unittest.hh.
Referenced by main().