20#include <xrpld/nodestore/detail/varint.h>
22#include <xrpl/beast/unit_test.h>
38 for (
auto const v : vv)
42 expect(n0 > 0,
"write error");
46 expect(n1 == n0,
"read error");
47 expect(v == v1,
"wrong value");
71 0xffffffffffffffffUL});
75BEAST_DEFINE_TESTSUITE(varint, nodestore,
ripple);
testcase_t testcase
Memberspace for declaring test cases.
bool expect(Condition const &shouldBeTrue)
Evaluate a test condition.
void run() override
Runs the suite.
void test_varints(std::vector< std::size_t > vv)
std::size_t read_varint(void const *buf, std::size_t buflen, std::size_t &t)
std::size_t size_varint(T v)
std::size_t write_varint(void *p0, std::size_t v)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.