Generated on for Gecode by doxygen 1.17.0

Base class for all tests to be run More...

#include <test/test.hh>

Public Member Functions

 Base (std::string s)
 Create and register test with name s.
const std::string & name (void) const
 Return name of test.
Basenext (void) const
 Return next test.
void next (Base *n)
 Set next test.
virtual bool run (void)=0
 Run test.
bool fixpoint (void)
 Throw a coin whether to compute a fixpoint.
virtual ~Base (void)
 Destructor.

Static Public Member Functions

static void sort (void)
 Sort tests alphabetically.
static Basetests (void)
 Return all tests.
static bool fixpoint (Gecode::Support::RandomGenerator &rand)
 Throw a coin whether to compute a fixpoint.

(Note that these are not member symbols.)

int main (int argc, char *argv[])
 Main function.

Mapping scalar values to strings

Gecode::Support::RandomGenerator _rand
 Random number generator.
static std::string str (bool b)
 Map bool to string.
static std::string str (int i)
 Map integer to string.
static std::string str (const Gecode::IntArgs &i)
 Map integer array to string.

Detailed Description

Base class for all tests to be run

Definition at line 121 of file test.hh.

Constructor & Destructor Documentation

◆ Base()

Test::Base::Base ( std::string s)

Create and register test with name s.

◆ ~Base()

virtual Test::Base::~Base ( void )
virtual

Destructor.

Member Function Documentation

◆ sort()

void Test::Base::sort ( void )
static

Sort tests alphabetically.

◆ name()

const std::string & Test::Base::name ( void ) const
inline

Return name of test.

Definition at line 51 of file test.hpp.

◆ tests()

Base * Test::Base::tests ( void )
inlinestatic

Return all tests.

Definition at line 55 of file test.hpp.

◆ next() [1/2]

Base * Test::Base::next ( void ) const
inline

Return next test.

Definition at line 59 of file test.hpp.

◆ next() [2/2]

void Test::Base::next ( Base * n)
inline

Set next test.

Definition at line 63 of file test.hpp.

◆ run()

◆ fixpoint() [1/2]

bool Test::Base::fixpoint ( void )
inline

Throw a coin whether to compute a fixpoint.

Definition at line 67 of file test.hpp.

◆ fixpoint() [2/2]

bool Test::Base::fixpoint ( Gecode::Support::RandomGenerator & rand)
inlinestatic

Throw a coin whether to compute a fixpoint.

Definition at line 72 of file test.hpp.

◆ str() [1/3]

std::string Test::Base::str ( bool b)
inlinestatic

Map bool to string.

Definition at line 77 of file test.hpp.

◆ str() [2/3]

std::string Test::Base::str ( int i)
inlinestatic

Map integer to string.

Definition at line 87 of file test.hpp.

◆ str() [3/3]

std::string Test::Base::str ( const Gecode::IntArgs & i)
inlinestatic

Map integer array to string.

Definition at line 94 of file test.hpp.

◆ main()

int main ( int argc,
char * argv[] )
related

Main function.

Member Data Documentation

◆ _rand

Gecode::Support::RandomGenerator Test::Base::_rand
mutable

Random number generator.

Definition at line 164 of file test.hh.


The documentation for this class was generated from the following files: