Base class for all tests to be run More...
#include <test/test.hh>
Public Member Functions | |
| 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. | |
| 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 Base * | tests (void) |
| Return all tests. | |
| static bool | fixpoint (Gecode::Support::RandomGenerator &rand) |
| Throw a coin whether to compute a fixpoint. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| int | run_registered_tests (int argc, char *argv[]) |
| Run the tests in the process-wide registry. | |
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
Constructor & Destructor Documentation
◆ Base() [1/2]
| Test::Base::Base | ( | std::string | s | ) |
◆ Base() [2/2]
| Test::Base::Base | ( | std::string | s, |
| TestTags | t ) |
◆ ~Base()
|
virtualdefault |
Destructor.
Member Function Documentation
◆ sort()
|
static |
◆ name()
|
inline |
◆ tags()
|
inline |
◆ tests()
|
inlinestatic |
◆ next() [1/2]
|
inline |
◆ next() [2/2]
◆ run()
|
pure virtual |
Run test.
Implemented in Test::AFC, Test::Array::EmptyVector, Test::Array::SharedArrayIterator, Test::Array::VarArgsIterator, Test::Array::VarArrayIterator, Test::Array::ViewArrayIterator, Test::Assign::BoolTest, Test::Assign::FloatTest, Test::Assign::IntTest, Test::Assign::SetTest, Test::Branch::BoolTest, Test::Branch::FilteredRndTies, Test::Branch::FloatTest, Test::Branch::IntTest, Test::Branch::SetTest, Test::Fault::BranchActionHeapFailures, Test::Fault::BranchChbHeapFailures, Test::Fault::CloneAdvisorCopy, Test::Fault::CloneBrancherCopy, Test::Fault::CloneDerivedSpaceCopy, Test::Fault::CloneDerivedSpaceUpdate, Test::Fault::CloneDisposalArray, Test::Fault::CloneHeapFailures, Test::Fault::CloneLocalObjectCopy, Test::Fault::ClonePropagatorCopy, Test::Fault::DisposeNoticeArray, Test::Fault::DisposeNoticeArrayResize, Test::Fault::HeapAllocation, Test::Fault::HeapReallocation, Test::Fault::IntSetHeapFailures, Test::Fault::MiniModelBoolMiscHeapFailure, Test::Fault::MiniModelDefaultNodes, Test::Fault::MiniModelFloatHeapFailures, Test::Fault::MiniModelHeapFailures, Test::Fault::MiniModelLinearSumHeapFailures, Test::Fault::MiniModelSetHeapFailures, Test::FlatZinc::Blackbox::NativeDllParallelCalls, Test::FlatZinc::Blackbox::NativeProtocol, Test::FlatZinc::FlatZincErrorTest, Test::FlatZinc::FlatZincTest, Test::Float::Arithmetic::DirectedRounding, Test::Float::Arithmetic::MedianRoundingMode, Test::Float::Arithmetic::MultZeroEndpoint, Test::Float::Arithmetic::PositiveNRootBounds, Test::Float::Arithmetic::PowConsistency, Test::Float::Arithmetic::RoundingScope, Test::Float::Basic::Median, Test::Float::Basic::OptimizeCut, Test::Float::Test, Test::Groups::Kill, Test::Instance::Case, Test::Int::Arithmetic::NumberTheoryAlgebraic, Test::Int::Arithmetic::NumberTheoryIdentities, Test::Int::Arithmetic::NumberTheoryLifecycle, Test::Int::Arithmetic::NumberTheoryLimits, Test::Int::Arithmetic::NumberTheorySparseBounds, Test::Int::Arithmetic::ProductBoundsLarge, Test::Int::Arithmetic::ProductCompactionZero, Test::Int::Arithmetic::ProductInverseBounds, Test::Int::Arithmetic::ProductModAlgebraic, Test::Int::Arithmetic::ProductModInvalidModulus, Test::Int::Arithmetic::ProductModNonzero, Test::Int::Arithmetic::ProductModVarAlgebraic, Test::Int::Arithmetic::ProductModVarBounds, Test::Int::Arithmetic::ProductModVarSparseModulus, Test::Int::Arithmetic::ProductPowerAlias, Test::Int::Arithmetic::ProductSimplifySign, Test::Int::BinPacking::CliqueMBPT, Test::Int::BinPacking::PropagationLevels, Test::Int::Cumulative::KnapsackAugmentedOverload, Test::Int::Cumulatives::ProfileContribution, Test::Int::Distinct::Pathological, Test::Int::Extensional::DenseCompressedTupleSetWideGap, Test::Int::Extensional::OpenRegularBackward, Test::Int::Extensional::OpenRegularClone, Test::Int::Extensional::OpenRegularDomainWake, Test::Int::Extensional::OpenRegularIncremental, Test::Int::Extensional::OpenRegularLengthWake, Test::Int::Extensional::OpenRegularMaxLength, Test::Int::Extensional::SparseTupleSetDisabledFailure, Test::Int::Extensional::SparseTupleSetWideDelta, Test::Int::Extensional::TupleSetAutoDefaultDispatch, Test::Int::Extensional::TupleSetDFARepresentation, Test::Int::Extensional::TupleSetDisabledClone, Test::Int::Extensional::TupleSetSingleRepresentation, Test::Int::Extensional::TupleSetSupportOffsetBoundary, Test::Int::Extensional::TupleSetTerminalFinalizationFailure, Test::Int::InterDistance::Posting, Test::Int::MinDistance::Arguments, Test::Int::MinDistance::Propagation, Test::Int::OpenList::Aliases, Test::Int::OpenList::BoolList, Test::Int::OpenList::BranchOrder, Test::Int::OpenList::CallbackLength, Test::Int::OpenList::Dispose, Test::Int::OpenList::DistinctWaves, Test::Int::OpenList::ExtremumBounds, Test::Int::OpenList::Factory, Test::Int::OpenList::FailedGet, Test::Int::OpenList::FixedStatistics, Test::Int::OpenList::Group, Test::Int::OpenList::GrowableIntSet, Test::Int::OpenList::ImpossibleWindow, Test::Int::OpenList::IncrementalConstraints, Test::Int::OpenList::NoGoods, Test::Int::OpenList::NoGPI, Test::Int::OpenList::OpenListMaterialize, Test::Int::OpenList::PatternEnumeration, Test::Int::OpenList::PatternGrowth, Test::Int::OpenList::PatternInput, Test::Int::OpenList::SelectorChoice, Test::Int::OpenList::Selectors, Test::Int::OpenList::Transition, Test::Int::OpenList::ValueCommit, Test::Int::OpenList::ValueReplay, Test::Int::OpenList::Views, Test::Int::OpenTest, Test::Int::Test, Test::LDSB::LDSB< T >, Test::LDSB::LDSBLatin, Test::LDSB::LDSBSet< T >, Test::NoGoods::NoGoods< Model, ValBranch >, Test::NoGPI, Test::Region, Test::Search::BAB< Model >, Test::Search::DFS< Model >, Test::Search::ExhaustedAtLimit, Test::Search::Heuristic< E >, Test::Search::HeuristicPortfolio, Test::Search::LDS< Model >, Test::Search::PBS< Model, Engine >, Test::Search::PBSBuilderStop, Test::Search::PBSConstructionFailure, Test::Search::PBSRestartCutoff, Test::Search::PBSRestartCutoffDeleted, Test::Search::RBS< Model, Engine >, Test::Search::RBSFailedFirstSlave, Test::Search::RBSFailedMaster, Test::Search::RBSIncompleteNoGoods, Test::Search::RBSRootFailure, Test::Search::RelaxFailed, Test::Search::SEBPBS< Model >, Test::Search::WorkerControlAPI, Test::Search::WorkerControlConcurrentResize, Test::Search::WorkerControlPBSPause, Test::Search::WorkerControlSequentialPause, and Test::Set::SetTest.
◆ fixpoint() [1/2]
|
inline |
◆ fixpoint() [2/2]
|
inlinestatic |
◆ str() [1/3]
|
inlinestatic |
◆ str() [2/3]
|
inlinestatic |
◆ str() [3/3]
|
inlinestatic |
Friends And Related Symbol Documentation
◆ run_registered_tests()
|
Run the tests in the process-wide registry.
Tests register during construction. They must remain alive until every runner call has returned; destruction does not remove a test from the process-wide registry. Runner calls must not overlap. Option parsing exits the process after printing help or reporting a malformed option.
Use -help to list options and -list to list registered tests. Failure reports provide a -replay state and exact -test name. Replay runs that test once on one thread, starting from the failing iteration's state. -log prints the buffered log on failure and requires one thread.
Repeated -tag options select the union of their tags. With no -tag, all tests are eligible, including tests without tags; -tag all selects tests with at least one known tag. Name and tag filters must both match. -list and -list-with-tags list every registered test, ignoring -test, -tag, and -start.
Member Data Documentation
◆ _rand
|
mutable |
The documentation for this class was generated from the following files:
