mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Split unit tests to separate files
This commit is contained in:
23
modules/ripple_data/protocol/ripple_SerializerUnitTests.cpp
Normal file
23
modules/ripple_data/protocol/ripple_SerializerUnitTests.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
BOOST_AUTO_TEST_SUITE (Serializer_suite)
|
||||
|
||||
BOOST_AUTO_TEST_CASE ( Serializer_PrefixHash_test )
|
||||
{
|
||||
Serializer s1;
|
||||
s1.add32 (3);
|
||||
s1.add256 (uint256 ());
|
||||
|
||||
Serializer s2;
|
||||
s2.add32 (0x12345600);
|
||||
s2.addRaw (s1.peekData ());
|
||||
|
||||
if (s1.getPrefixHash (0x12345600) != s2.getSHA512Half ())
|
||||
BOOST_FAIL ("Prefix hash does not work");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END ();
|
||||
Reference in New Issue
Block a user