Generated on for Gecode by doxygen 1.17.0
Test Namespace Reference

General test support. More...

Namespaces

namespace  Array
 Tests for arrays.
namespace  Assign
 Tests for assignments.
namespace  Branch
 Tests for branchings.
namespace  Fault
namespace  FlatZinc
 Tests for FlatZinc.
namespace  Float
 Testing domain floats.
namespace  Groups
namespace  Instance
namespace  Int
 Testing finite domain integers.
namespace  LDSB
 Testing for LDSB.
namespace  NoGoods
 Tests for search using no-goods.
 Tests for search engines.
namespace  Set
 Testing finite sets.

Classes

class  AFC
 Test for AFC infrastructure More...
class  Base
 Base class for all tests to be run More...
class  ind
 Simple class for describing indentation. More...
class  NoGPI
 Scoped suppression of global propagator information. More...
class  Options
 Commandline options. More...
class  Region
 Test for Region memory area More...
class  SortByName
 Sort tests by name. More...
class  TestExecutionControl
class  TestExecutor
struct  TestTagDescription
 A command-line name and its corresponding test tag. More...
class  TestTags
 Set of test tags. More...

Enumerations

enum  MatchType { MT_ANY , MT_NOT , MT_FIRST }
 How to match. More...
enum class  TestTag : unsigned int { check = 1U << 0 , standard = 1U << 1 , sweep = 1U << 2 }
 Tags for test selection. More...

Functions

void report_error (const std::string &name, unsigned int seed, const Options &options, std::ostream &ostream)
bool run_test (Base *test, unsigned int test_seed, const Options &options, std::ostream &ostream)
 Run a single test, returning true iff the test succeeded.
void print_test_summary (size_t selected, size_t passed, size_t failed)
 Report test cases; iterations of a test count as one case.
int run_tests (const std::vector< Base * > &tests, const Options &options)
 Run all the tests with the supplied options.
int run_tests_parallel (const std::vector< Base * > &tests, const Options &options)
 Run all the tests with the supplied options in parallel.
std::vector< Base * > select_tests (const Options &options)
int run_registered_tests (int argc, char *argv[])
int run_registered_tests (int argc, char *argv[])
 Run the tests in the process-wide registry.
std::ostream & operator<< (std::ostream &os, const Test::ind &i)
 Print indentation.

Variables

NoGPI no_gpi
AFC afc
Region r
std::ostringstream olog
 Stream used for logging.
Options opt
 The options.

Detailed Description

General test support.

Enumeration Type Documentation

◆ MatchType

How to match.

Enumerator
MT_ANY 
MT_NOT 
MT_FIRST 

Definition at line 91 of file test.hh.

◆ TestTag

enum class Test::TestTag : unsigned int
strong

Tags for test selection.

Enumerator
check 

Basic integrity tests.

standard 

Standard test suite.

sweep 

Really heavy sweep tests.

Definition at line 98 of file test.hh.

Function Documentation

◆ report_error()

void Test::report_error ( const std::string & name,
unsigned int seed,
const Options & options,
std::ostream & ostream )

Definition at line 167 of file test.cpp.

◆ run_test()

bool Test::run_test ( Base * test,
unsigned int test_seed,
const Options & options,
std::ostream & ostream )

Run a single test, returning true iff the test succeeded.

Definition at line 361 of file test.cpp.

◆ print_test_summary()

void Test::print_test_summary ( size_t selected,
size_t passed,
size_t failed )

Report test cases; iterations of a test count as one case.

Definition at line 392 of file test.cpp.

◆ run_tests()

int Test::run_tests ( const std::vector< Base * > & tests,
const Options & options )

Run all the tests with the supplied options.

Definition at line 401 of file test.cpp.

◆ run_tests_parallel()

int Test::run_tests_parallel ( const std::vector< Base * > & tests,
const Options & options )

Run all the tests with the supplied options in parallel.

Definition at line 570 of file test.cpp.

◆ select_tests()

std::vector< Base * > Test::select_tests ( const Options & options)

Definition at line 584 of file test.cpp.

◆ run_registered_tests() [1/2]

int Test::run_registered_tests ( int argc,
char * argv[] )
related

Definition at line 603 of file test.cpp.

Variable Documentation

◆ no_gpi

NoGPI Test::no_gpi

Definition at line 318 of file afc.cpp.

◆ afc

AFC Test::afc

Definition at line 320 of file afc.cpp.

◆ r

Region Test::r

Definition at line 65 of file region.cpp.

◆ olog

std::ostringstream Test::olog

Stream used for logging.

The olog is buffered and printed only if an error has occurred.

Definition at line 54 of file test.cpp.

◆ opt

Options Test::opt

The options.

Definition at line 163 of file test.cpp.