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:
Vinnie Falco
2014-12-23 12:28:19 -08:00
parent 9eb7c8344f
commit 9a3214d46e
65 changed files with 2396 additions and 2788 deletions

View File

@@ -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