27#ifndef TESTHELPER_RUN_H
28#define TESTHELPER_RUN_H
43 using std::shared_ptr;
45 using Arg = std::vector<string> &;
91 Launch (
string testID,
string groups)
96 virtual shared_ptr<Test>
99 return shared_ptr<Test> (
new TEST );
116#define LAUNCHER(_TEST_CLASS_, _GROUPS_) \
118 Launch<_TEST_CLASS_> run_##_TEST_CLASS_##_(STRINGIFY(_TEST_CLASS_), _GROUPS_);
Helper class for running a collection of tests.
Launch(string testID, string groups)
virtual shared_ptr< Test > makeInstance() override
interface: generic testcase creating functor.
virtual ~Launcher()=default
virtual shared_ptr< Test > makeInstance()=0
static void enrol(Launcher *test, string testID, string groups)
register the given test-launcher, so it can be later accessed either as a member of one of the specif...
Abstract Base Class for all testcases.
virtual ~Test()=default
this is an interface
virtual void run(Arg arg)=0
lib::Random makeRandGen()
build a dedicated new RandomGen, seeded from the default-Gen
static uint firstVal(Arg, uint=1)
conveniently use some number given as argument, with optional default
void seedRand()
draw a new random seed from a common nucleus, and re-seed the default-Gen.
static string firstTok(Arg)
conveniently pick the first token from the argument line
Lumiera error handling (C++ interface).
double ranRange(double start, double bound)
int rani(uint bound=_iBOUND())
Random defaultGen
a global default RandomSequencer for mundane purposes
double ranNormal(double mean=0.0, double stdev=1.0)
Test runner and basic definitions for tests.
std::vector< string > & Arg
Generating (pseudo) random numbers with controlled seed.
Building and running a suite of tests, implemented as test classes.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...