Add Validators unit tests

This commit is contained in:
Vinnie Falco
2013-07-13 07:37:49 -07:00
parent ac13e93b31
commit 371c3af450
4 changed files with 25 additions and 2 deletions

View File

@@ -120,6 +120,6 @@
//#define BEAST_BIND_USES_TR1 1
//#define BEAST_BIND_USES_BOOST 1
#define BEAST_UNIT_TESTS 1
//#define BEAST_UNIT_TESTS 1
#endif

View File

@@ -41,6 +41,9 @@ public:
// Visit every object in the database
// This function will only be called during an import operation
//
// VFALCO TODO Replace FUNCTION_TYPE with a beast lift.
//
virtual void visitAll (FUNCTION_TYPE <void (NodeObject::pointer)>) = 0;
// VFALCO TODO Put this bulk writing logic into a separate class.

View File

@@ -14,7 +14,7 @@
class Validator
{
public:
typedef RippleAddress PublicKey;
typedef uint256 PublicKey;
explicit Validator (PublicKey const& publicKey);

View File

@@ -218,3 +218,23 @@ Validators* Validators::New (Listener* listener)
{
return new ValidatorsImp (listener);
}
//------------------------------------------------------------------------------
/** Produces validators for unit tests.
*/
class TestValidatorSource : public Validators::Source
{
public:
static Validator makeValidator (int publicKeyIndex)
{
}
ValidatorList::Ptr fetch ()
{
ValidatorList::Ptr list = new ValidatorList;
return list;
}
};