Bugfixes, unit test support.

This commit is contained in:
JoelKatz
2012-04-25 21:47:33 -07:00
parent ccd2f9a76f
commit 80a71b3d2b

View File

@@ -31,7 +31,10 @@ enum SOE_Field
sfAccount, sfSequence, sfBalance, sfWalletLocator, sfEmailHash, sfAccount, sfSequence, sfBalance, sfWalletLocator, sfEmailHash,
sfBorrower, sfLendfer, sfLimit, sfOfferCurrency, sfBorrower, sfLendfer, sfLimit, sfOfferCurrency,
sfLastReceive, sfLastTxn, sfLender, sfNextRate, sfNextRateLgr, sfNextRateExp, sfLastReceive, sfLastTxn, sfLender, sfNextRate, sfNextRateLgr, sfNextRateExp,
sfNickname, sfMinimumOffer sfNickname, sfMinimumOffer,
// test fields
sfTest1, sfTest2, sfTest3, sfTest4
}; };
struct SOElement struct SOElement
@@ -65,6 +68,7 @@ public:
virtual bool isEquivalent(const SerializedType& t) const; virtual bool isEquivalent(const SerializedType& t) const;
void add(Serializer& s) const; void add(Serializer& s) const;
Serializer getSerializer() const { Serializer s; add(s); return s; }
std::string getFullText() const; std::string getFullText() const;
std::string getText() const; std::string getText() const;
virtual Json::Value getJson(int options) const; virtual Json::Value getJson(int options) const;
@@ -119,8 +123,10 @@ public:
{ setValueFieldAccount(field, addr.getAccountID()); } { setValueFieldAccount(field, addr.getAccountID()); }
bool isFieldPresent(SOE_Field field) const; bool isFieldPresent(SOE_Field field) const;
void makeFieldPresent(SOE_Field field); SerializedType* makeFieldPresent(SOE_Field field);
void makeFieldAbsent(SOE_Field field); void makeFieldAbsent(SOE_Field field);
static void unitTest();
}; };