42 #ifndef __GECODE_TEST_TEST_HH__
43 #define __GECODE_TEST_TEST_HH__
67 extern std::ostringstream
olog;
100 void parse(
int argc,
char* argv[]);
116 static unsigned int _n_tests;
119 Base(
const std::string& s);
121 static void sort(
void);
123 const std::string&
name(
void)
const;
131 virtual bool run(
void) = 0;
148 int main(
int argc,
char* argv[]);
const std::string & name(void) const
Return name of test.
virtual ~Base(void)
Destructor.
static void sort(void)
Sort tests alphabetically.
Simple class for describing identation.
Base * next(void) const
Return next test.
static Gecode::Support::RandomGenerator rand
Random number generator.
Base(const std::string &s)
Create and register test with name s.
int main(int argc, char *argv[])
Main-function.
unsigned int seed
The random seed to be used.
unsigned int iter
Number of iterations for each test.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
static Base * tests(void)
Return all tests.
virtual bool run(void)=0
Run test.
static bool fixpoint(void)
Throw a coin whether to compute a fixpoint.
Base class for all tests to be run
bool log
Whether to log the tests.
static const unsigned int deffixprob
Default fixpoint probaibility.
Template for linear congruential generators.
void parse(int argc, char *argv[])
Parse commandline arguments.
std::ostringstream olog
Stream used for logging.
ind(int i)
Indent by level i.
unsigned int fixprob
The probability for computing a fixpoint.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatView &x)
Print float variable view.
Options(void)
Initialize options with defaults.
static const int defiter
Default number of iterations.
bool stop
Whether to stop on an error.
int l
Which indentation level.