decompiler
1.0.0
|
Simple unit test class. More...
#include <test.hh>
Public Member Functions | |
UnitTest (const string &name, testfunc_t func) | |
Constructor. More... | |
Static Public Member Functions | |
static int | run (set< string > &testNames) |
Run all the instantiated tests. More... | |
Public Attributes | |
string | name |
Name of the test. | |
testfunc_t | func |
Call-back function executing the test. | |
Static Public Attributes | |
static vector< UnitTest * > | tests |
The collection of test objects. | |
Simple unit test class.
The macro TEST instantiates this object with a name and function pointer. The static run() method calls all the function pointers of all instantiated objects.
|
inline |
Constructor.
name | is the identifier for the test |
func | is a call-back function that executes the test |
References run().
|
static |
Run all the instantiated tests.
Run all the tests unless a non-empty set of names is passed in. In which case, only the named tests in the set are run.
testNames | is the set of names |
References ghidra::FunctionTestCollection::runTestFiles().
Referenced by UnitTest().