Generated on for Gecode by doxygen 1.17.0
Test::Instance::Case Class Reference

Test given by a function More...

Public Member Functions

 Case (const std::string &n, std::function< bool(void)> f0)
 Create test n running f0.
virtual bool run (void)
 Run the test.
Public Member Functions inherited from Test::Base
 Base (std::string s)
 Create and register a standard test with name s.
 Base (std::string s, TestTags t)
 Create and register test with name s and tags t.
const std::string & name (void) const
 Return name of test.
TestTags tags (void) const
 Return tags for test.
Base * next (void) const
 Return next test.
void next (Base *n)
 Set next test.
bool fixpoint (void)
 Throw a coin whether to compute a fixpoint.
virtual ~Base (void)
 Destructor.

Protected Attributes

std::function< bool(void)> f
 The test.

Additional Inherited Members

Static Public Member Functions inherited from Test::Base
static void sort (void)
 Sort tests alphabetically.
static Base * tests (void)
 Return all tests.
static bool fixpoint (Gecode::Support::RandomGenerator &rand)
 Throw a coin whether to compute a fixpoint.
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.
Gecode::Support::RandomGenerator _rand
 Random number generator.

Detailed Description

Test given by a function

Definition at line 114 of file instance.cpp.

Constructor & Destructor Documentation

◆ Case()

Test::Instance::Case::Case ( const std::string & n,
std::function< bool(void)> f0 )
inline

Create test n running f0.

Definition at line 120 of file instance.cpp.

Member Function Documentation

◆ run()

virtual bool Test::Instance::Case::run ( void )
inlinevirtual

Run the test.

Implements Test::Base.

Definition at line 123 of file instance.cpp.

Member Data Documentation

◆ f

std::function<bool(void)> Test::Instance::Case::f
protected

The test.

Definition at line 117 of file instance.cpp.


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