QuickCheck++
0.0.3
Automated testing library
|
1-argument property. More...
#include <Property.hh>
Public Member Functions | |
virtual void | addFixed (const A &a) |
Adds a fixed test case for with the given arguments. More... | |
![]() | |
PropertyBase () | |
Constructor. More... | |
virtual | ~PropertyBase () |
Destructor. More... | |
bool | check (size_t n=100, size_t max=0, bool isVerbose=false, std::ostream &out=std::cout) |
Checks this property. More... | |
Private Member Functions | |
virtual bool | accepts (const A &a) |
Tells whether or not this property should accept given arguments. More... | |
virtual const std::string | classify (const A &a) |
Classifies input to allow observation of input distribution. More... | |
virtual void | generateInput (size_t n, A &a) |
Generates input randomly. More... | |
virtual bool | holdsFor (const A &a)=0 |
Tells whether or not this property holds for the given input. More... | |
virtual bool | isTrivialFor (const A &a) |
Tells whether or not the property is trivially true for the given input. More... | |
bool | _accepts (const A &a, const Unit &b, const Unit &c, const Unit &d, const Unit &e) |
Generic wrapper for Property::accepts. More... | |
const std::string | _classify (const A &a, const Unit &b, const Unit &c, const Unit &d, const Unit &e) |
Generic wrapper for Property::classify. More... | |
void | _generateInput (size_t n, A &a, Unit &b, Unit &c, Unit &d, Unit &e) |
Generic wrapper for Property::generateInput. More... | |
bool | _holdsFor (const A &a, const Unit &b, const Unit &c, const Unit &d, const Unit &e) |
Generic wrappper for Property::holdsFor. More... | |
bool | _isTrivialFor (const A &a, const Unit &b, const Unit &c, const Unit &d, const Unit &e) |
Generic wrapper for Property::isTrivialFor. More... | |
Additional Inherited Members | |
![]() | |
void | _addFixed (const A &a, const Unit &b, const Unit &c, const Unit &d, const Unit &e) |
Adds a fixed test case for with the given arguments. More... | |
1-argument property.
This class models a property (see PropertyBase) with 1-argument input.
A | the type of the only argument |
|
privatevirtual |
Generic wrapper for Property::accepts.
a | the first argument |
b | the second argument or UNIT if less than two arguments |
c | the third argument or UNIT if less than three arguments |
d | the fourth argument or UNIT if less than four arguments |
e | the fifth argument or UNIT if less than five arguments |
true
if arguments forms valid input and false
otherwise Implements quickcheck::PropertyBase< A, Unit, Unit, Unit, Unit >.
|
privatevirtual |
Generic wrapper for Property::classify.
a | the first argument |
b | the second argument or UNIT if less than two arguments |
c | the third argument or UNIT if less than three arguments |
d | the fourth argument or UNIT if less than four arguments |
e | the fifth argument or UNIT if less than five arguments |
Implements quickcheck::PropertyBase< A, Unit, Unit, Unit, Unit >.
|
privatevirtual |
Generic wrapper for Property::generateInput.
n | the size hint |
a | the first argument |
b | the second argument or UNIT if less than two arguments |
c | the third argument or UNIT if less than three arguments |
d | the fourth argument or UNIT if less than four arguments |
e | the fifth argument or UNIT if less than five arguments |
Implements quickcheck::PropertyBase< A, Unit, Unit, Unit, Unit >.
|
privatevirtual |
Generic wrappper for Property::holdsFor.
a | the first argument |
b | the second argument or UNIT if less than two arguments |
c | the third argument or UNIT if less than three arguments |
d | the fourth argument or UNIT if less than four arguments |
e | the fifth argument or UNIT if less than five arguments |
true
if the property holds and false
otherwise Implements quickcheck::PropertyBase< A, Unit, Unit, Unit, Unit >.
|
privatevirtual |
Generic wrapper for Property::isTrivialFor.
a | the first argument |
b | the second argument or UNIT if less than two arguments |
c | the third argument or UNIT if less than three arguments |
d | the fourth argument or UNIT if less than four arguments |
e | the fifth argument or UNIT if less than five arguments |
true
if the property is trivial for given arguments and false
otherwise Implements quickcheck::PropertyBase< A, Unit, Unit, Unit, Unit >.
|
privatevirtual |
Tells whether or not this property should accept given arguments.
1-argument counterpart of Property::accepts.
a | the only argument |
|
virtual |
Adds a fixed test case for with the given arguments.
1-argument counterpart of Property::addFixed.
a | the first argument of the test case |
|
privatevirtual |
Classifies input to allow observation of input distribution.
1-argument counterpart of Property::classify.
a | the only argument |
|
privatevirtual |
Generates input randomly.
1-argument counterpart of Property::generateInput.
n | the size hint |
a | the only argument |
|
privatepure virtual |
Tells whether or not this property holds for the given input.
1-argument counterpart of Property::holdsFor.
a | the only argument |
|
privatevirtual |
Tells whether or not the property is trivially true for the given input.
1-argument counterpart of Property::isTrivialFor.
a | the only argument |