1#include <test/nodestore/TestBase.h>
3#include <xrpl/beast/unit_test/suite.h>
4#include <xrpl/nodestore/NodeObject.h>
5#include <xrpl/nodestore/detail/DecodedBlob.h>
6#include <xrpl/nodestore/detail/EncodedBlob.h>
43 for (
int i = 0; i < batch.size(); ++i)
49 BEAST_EXPECT(decoded.
wasOk());
55 BEAST_EXPECT(
isSame(batch[i],
object));
TestcaseT testcase
Memberspace for declaring test cases.
Parsed key/value blob into NodeObject components.
std::shared_ptr< NodeObject > createObject()
Create a NodeObject from this data.
bool wasOk() const noexcept
Determine if the decoding was successful.
Convert a NodeObject from in-memory to database format.
void const * getKey() const noexcept
std::size_t getSize() const noexcept
void const * getData() const noexcept
void testBlobs(std::uint64_t const seedValue)
void testBatches(std::uint64_t const seedValue)
void run() override
Runs the suite.
static bool areBatchesEqual(Batch const &lhs, Batch const &rhs)
static Batch createPredictableBatch(int numObjects, std::uint64_t seed)
static int const kNumObjectsToTest
bool isSame(std::shared_ptr< NodeObject > const &lhs, std::shared_ptr< NodeObject > const &rhs)
Returns true if objects are identical.
BEAST_DEFINE_TESTSUITE(Backend, nodestore, xrpl)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.