Generated on for Gecode by doxygen 1.17.0
Test::FlatZinc::FlatZincTest Class Reference

Base class for tests for FlatZinc More...

#include <test/flatzinc.hh>

Public Member Functions

 FlatZincTest (const std::string &name, const std::string &source, const std::string &expected, bool allSolutions=false, std::vector< std::string > cmdlineOpt={}, OutputCheck check=OutputCheck(), BeforeRun before=BeforeRun())
 Construct and register test.
virtual bool run (void)
 Perform test.
Public Member Functions inherited from Test::Base
 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.
bool fixpoint (void)
 Throw a coin whether to compute a fixpoint.
virtual ~Base (void)
 Destructor.

Protected Types

typedef std::function< bool(const std::string &)> OutputCheck
typedef std::function< void(void)> BeforeRun

Protected Attributes

std::string _name
std::string _source
std::string _expected
bool _allSolutions
std::vector< std::string > _cmdlineOpt
OutputCheck _check
BeforeRun _before

Additional Inherited Members

Static Public Member Functions inherited from Test::Base
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.
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

Base class for tests for FlatZinc

Definition at line 55 of file flatzinc.hh.

Member Typedef Documentation

◆ OutputCheck

typedef std::function<bool(const std::string&)> Test::FlatZinc::FlatZincTest::OutputCheck
protected

Definition at line 57 of file flatzinc.hh.

◆ BeforeRun

typedef std::function<void(void)> Test::FlatZinc::FlatZincTest::BeforeRun
protected

Definition at line 58 of file flatzinc.hh.

Constructor & Destructor Documentation

◆ FlatZincTest()

Test::FlatZinc::FlatZincTest::FlatZincTest ( const std::string & name,
const std::string & source,
const std::string & expected,
bool allSolutions = false,
std::vector< std::string > cmdlineOpt = {},
OutputCheck check = OutputCheck(),
BeforeRun before = BeforeRun() )

Construct and register test.

Member Function Documentation

◆ run()

virtual bool Test::FlatZinc::FlatZincTest::run ( void )
virtual

Perform test.

Implements Test::Base.

Reimplemented in Test::FlatZinc::FlatZincErrorTest.

Member Data Documentation

◆ _name

std::string Test::FlatZinc::FlatZincTest::_name
protected

Definition at line 59 of file flatzinc.hh.

◆ _source

std::string Test::FlatZinc::FlatZincTest::_source
protected

Definition at line 60 of file flatzinc.hh.

◆ _expected

std::string Test::FlatZinc::FlatZincTest::_expected
protected

Definition at line 61 of file flatzinc.hh.

◆ _allSolutions

bool Test::FlatZinc::FlatZincTest::_allSolutions
protected

Definition at line 62 of file flatzinc.hh.

◆ _cmdlineOpt

std::vector<std::string> Test::FlatZinc::FlatZincTest::_cmdlineOpt
protected

Definition at line 63 of file flatzinc.hh.

◆ _check

OutputCheck Test::FlatZinc::FlatZincTest::_check
protected

Definition at line 64 of file flatzinc.hh.

◆ _before

BeforeRun Test::FlatZinc::FlatZincTest::_before
protected

Definition at line 65 of file flatzinc.hh.


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