mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Normalize files containing unit test code:
Source files are split to place all unit test code into translation
units ending in .test.cpp with no other business logic in the same file,
and in directories named "test".
A new target is added to the SConstruct, invoked by:
scons count
This prints the total number of source code lines occupied by unit tests,
in rippled specific code and excluding library subtrees.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/protocol/Serializer.h>
|
||||
#include <beast/unit_test/suite.h>
|
||||
#include <openssl/ripemd.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
@@ -648,25 +647,4 @@ Blob SerializerIterator::getRaw (int iLength)
|
||||
return mSerializer.getRaw (iPos, iLength);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class Serializer_test : public beast::unit_test::suite
|
||||
{
|
||||
public:
|
||||
void run ()
|
||||
{
|
||||
Serializer s1;
|
||||
s1.add32 (3);
|
||||
s1.add256 (uint256 ());
|
||||
|
||||
Serializer s2;
|
||||
s2.add32 (0x12345600);
|
||||
s2.addRaw (s1.peekData ());
|
||||
|
||||
expect (s1.getPrefixHash (0x12345600) == s2.getSHA512Half ());
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(Serializer,ripple_data,ripple);
|
||||
|
||||
} // ripple
|
||||
|
||||
Reference in New Issue
Block a user