QuickCheck++  0.0.3
Automated testing library
Public Member Functions | Private Member Functions | List of all members
quickcheck::Property< A, B, C, D > Class Template Referenceabstract

4-argument property. More...

#include <Property.hh>

Inheritance diagram for quickcheck::Property< A, B, C, D >:
quickcheck::PropertyBase< A, B, C, D, Unit >

Public Member Functions

virtual void addFixed (const A &a, const B &b, const C &c, const D &d)
 Adds a fixed test case for with the given arguments. More...
 
- Public Member Functions inherited from quickcheck::PropertyBase< A, B, C, D, Unit >
 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, const B &b, const C &c, const D &d)
 Tells whether or not this property should accept given arguments. More...
 
virtual const std::string classify (const A &a, const B &b, const C &c, const D &d)
 Classifies input to allow observation of input distribution. More...
 
virtual void generateInput (size_t n, A &a, B &b, C &c, D &d)
 Generates input randomly. More...
 
virtual bool holdsFor (const A &a, const B &b, const C &c, const D &d)=0
 Tells whether or not this property holds for the given input. More...
 
virtual bool isTrivialFor (const A &a, const B &b, const C &c, const D &d)
 Tells whether or not the property is trivially true for the given input. More...
 
bool _accepts (const A &a, const B &b, const C &c, const D &d, const Unit &e)
 Generic wrapper for Property::accepts. More...
 
const std::string _classify (const A &a, const B &b, const C &c, const D &d, const Unit &e)
 Generic wrapper for Property::classify. More...
 
void _generateInput (size_t n, A &a, B &b, C &c, D &d, Unit &e)
 Generic wrapper for Property::generateInput. More...
 
bool _holdsFor (const A &a, const B &b, const C &c, const D &d, const Unit &e)
 Generic wrappper for Property::holdsFor. More...
 
bool _isTrivialFor (const A &a, const B &b, const C &c, const D &d, const Unit &e)
 Generic wrapper for Property::isTrivialFor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from quickcheck::PropertyBase< A, B, C, D, Unit >
void _addFixed (const A &a, const B &b, const C &c, const D &d, const Unit &e)
 Adds a fixed test case for with the given arguments. More...
 

Detailed Description

template<class A, class B, class C, class D>
class quickcheck::Property< A, B, C, D >

4-argument property.

This class models a property (see PropertyBase) with 4-argument input.

Template Parameters
Athe type of the first argument
Bthe type of the second argument
Cthe type of the third argument
Dthe type of the fourth argument

Member Function Documentation

template<class A , class B , class C , class D >
bool quickcheck::Property< A, B, C, D >::_accepts ( const A &  a,
const B &  b,
const C &  c,
const D &  d,
const Unit e 
)
privatevirtual

Generic wrapper for Property::accepts.

Parameters
athe first argument
bthe second argument or UNIT if less than two arguments
cthe third argument or UNIT if less than three arguments
dthe fourth argument or UNIT if less than four arguments
ethe fifth argument or UNIT if less than five arguments
Returns
true if arguments forms valid input and false otherwise

Implements quickcheck::PropertyBase< A, B, C, D, Unit >.

template<class A , class B , class C , class D >
const std::string quickcheck::Property< A, B, C, D >::_classify ( const A &  a,
const B &  b,
const C &  c,
const D &  d,
const Unit e 
)
privatevirtual

Generic wrapper for Property::classify.

Parameters
athe first argument
bthe second argument or UNIT if less than two arguments
cthe third argument or UNIT if less than three arguments
dthe fourth argument or UNIT if less than four arguments
ethe fifth argument or UNIT if less than five arguments
Returns
a string representing the input class

Implements quickcheck::PropertyBase< A, B, C, D, Unit >.

template<class A , class B , class C , class D >
void quickcheck::Property< A, B, C, D >::_generateInput ( size_t  n,
A &  a,
B &  b,
C &  c,
D &  d,
Unit e 
)
privatevirtual

Generic wrapper for Property::generateInput.

Parameters
nthe size hint
athe first argument
bthe second argument or UNIT if less than two arguments
cthe third argument or UNIT if less than three arguments
dthe fourth argument or UNIT if less than four arguments
ethe fifth argument or UNIT if less than five arguments

Implements quickcheck::PropertyBase< A, B, C, D, Unit >.

template<class A , class B , class C , class D >
bool quickcheck::Property< A, B, C, D >::_holdsFor ( const A &  a,
const B &  b,
const C &  c,
const D &  d,
const Unit e 
)
privatevirtual

Generic wrappper for Property::holdsFor.

Parameters
athe first argument
bthe second argument or UNIT if less than two arguments
cthe third argument or UNIT if less than three arguments
dthe fourth argument or UNIT if less than four arguments
ethe fifth argument or UNIT if less than five arguments
Returns
true if the property holds and false otherwise

Implements quickcheck::PropertyBase< A, B, C, D, Unit >.

template<class A , class B , class C , class D >
bool quickcheck::Property< A, B, C, D >::_isTrivialFor ( const A &  a,
const B &  b,
const C &  c,
const D &  d,
const Unit e 
)
privatevirtual

Generic wrapper for Property::isTrivialFor.

Parameters
athe first argument
bthe second argument or UNIT if less than two arguments
cthe third argument or UNIT if less than three arguments
dthe fourth argument or UNIT if less than four arguments
ethe fifth argument or UNIT if less than five arguments
Returns
true if the property is trivial for given arguments and false otherwise

Implements quickcheck::PropertyBase< A, B, C, D, Unit >.

template<class A , class B , class C , class D >
bool quickcheck::Property< A, B, C, D >::accepts ( const A &  a,
const B &  b,
const C &  c,
const D &  d 
)
privatevirtual

Tells whether or not this property should accept given arguments.

4-argument counterpart of Property::accepts.

Parameters
athe first argument
bthe second argument
cthe third argument
dthe fourth argument
template<class A , class B , class C , class D >
void quickcheck::Property< A, B, C, D >::addFixed ( const A &  a,
const B &  b,
const C &  c,
const D &  d 
)
virtual

Adds a fixed test case for with the given arguments.

4-argument counterpart of Property::addFixed.

Parameters
athe first argument of the test case
bthe second argument of the test case
cthe third argument of the test case
dthe fourth argument of the test case
template<class A , class B , class C , class D >
const std::string quickcheck::Property< A, B, C, D >::classify ( const A &  a,
const B &  b,
const C &  c,
const D &  d 
)
privatevirtual

Classifies input to allow observation of input distribution.

4-argument counterpart of Property::classify.

Parameters
athe first argument
bthe second argument
cthe third argument
dthe fourth argument
template<class A , class B , class C , class D >
void quickcheck::Property< A, B, C, D >::generateInput ( size_t  n,
A &  a,
B &  b,
C &  c,
D &  d 
)
privatevirtual

Generates input randomly.

4-argument counterpart of Property::generateInput.

Parameters
nthe size hint
athe first argument
bthe second argument
cthe third argument
dthe fourth argument
template<class A , class B , class C , class D >
virtual bool quickcheck::Property< A, B, C, D >::holdsFor ( const A &  a,
const B &  b,
const C &  c,
const D &  d 
)
privatepure virtual

Tells whether or not this property holds for the given input.

4-argument counterpart of Property::holdsFor.

Parameters
athe first argument
bthe second argument
cthe third argument
dthe fourth argument
template<class A , class B , class C , class D >
bool quickcheck::Property< A, B, C, D >::isTrivialFor ( const A &  a,
const B &  b,
const C &  c,
const D &  d 
)
privatevirtual

Tells whether or not the property is trivially true for the given input.

4-argument counterpart of Property::isTrivialFor.

Parameters
athe first argument
bthe second argument
cthe third argument
dthe fourth argument

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