Convert unit tests to beast

This commit is contained in:
Vinnie Falco
2013-07-24 06:49:03 -07:00
parent 3f26375583
commit c27294e0f0
32 changed files with 1337 additions and 1480 deletions

View File

@@ -704,3 +704,32 @@ Blob SerializerIterator::getRaw (int iLength)
return mSerializer.getRaw (iPos, iLength);
}
//------------------------------------------------------------------------------
class SerializerTests : public UnitTest
{
public:
SerializerTests () : UnitTest ("Serializer", "ripple")
{
}
void runTest ()
{
beginTest ("hash");
Serializer s1;
s1.add32 (3);
s1.add256 (uint256 ());
Serializer s2;
s2.add32 (0x12345600);
s2.addRaw (s1.peekData ());
expect (s1.getPrefixHash (0x12345600) == s2.getSHA512Half ());
}
};
static SerializerTests serializerTests;