38#ifndef __GECODE_TEST_TEST_HH__
39#define __GECODE_TEST_TEST_HH__
63 extern std::ostringstream
olog;
96 void parse(
int argc,
char* argv[]);
112 static unsigned int _n_tests;
115 Base(
const std::string& s);
117 static void sort(
void);
119 const std::string&
name(
void)
const;
127 virtual bool run(
void) = 0;
144int main(
int argc,
char* argv[]);
int n
Number of negative literals for node type.
Template for linear congruential generators.
Base class for all tests to be run
static Gecode::Support::RandomGenerator rand
Random number generator.
Base(const std::string &s)
Create and register test with name s.
static Base * tests(void)
Return all tests.
virtual ~Base(void)
Destructor.
static bool fixpoint(void)
Throw a coin whether to compute a fixpoint.
Base * next(void) const
Return next test.
virtual bool run(void)=0
Run test.
const std::string & name(void) const
Return name of test.
static void sort(void)
Sort tests alphabetically.
void parse(int argc, char *argv[])
Parse commandline arguments.
bool log
Whether to log the tests.
unsigned int seed
The random seed to be used.
Options(void)
Initialize options with defaults.
static const unsigned int deffixprob
Default fixpoint probaibility.
unsigned int iter
Number of iterations for each test.
bool stop
Whether to stop on an error.
unsigned int fixprob
The probability for computing a fixpoint.
static const int defiter
Default number of iterations.
Simple class for describing identation.
int l
Which indentation level.
ind(int i)
Indent by level i.
std::ostringstream olog
Stream used for logging.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const Dictionary &d)
Print statistics summary.
int main(int argc, char *argv[])