mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
DO NOT MERGE
This commit is contained in:
@@ -36,6 +36,7 @@ class xxhasher
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using result_type = std::size_t;
|
using result_type = std::size_t;
|
||||||
|
static int volatile test;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static_assert(sizeof(std::size_t) == 8, "requires 64-bit std::size_t");
|
static_assert(sizeof(std::size_t) == 8, "requires 64-bit std::size_t");
|
||||||
@@ -143,6 +144,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (state_)
|
if (state_)
|
||||||
{
|
{
|
||||||
|
test = test + 1;
|
||||||
XXH3_freeState(state_);
|
XXH3_freeState(state_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
|
|
||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
|
int volatile xxhasher::test = 0;
|
||||||
|
|
||||||
class XXHasher_test : public unit_test::suite
|
class XXHasher_test : public unit_test::suite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -102,6 +104,8 @@ public:
|
|||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
static_cast<xxhasher::result_type>(hasher) ==
|
static_cast<xxhasher::result_type>(hasher) ==
|
||||||
17285302196561698791ULL);
|
17285302196561698791ULL);
|
||||||
|
|
||||||
|
BEAST_EXPECT(xxhasher::test > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -123,6 +127,8 @@ public:
|
|||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
static_cast<xxhasher::result_type>(hasher) ==
|
static_cast<xxhasher::result_type>(hasher) ==
|
||||||
1865045178324729219ULL);
|
1865045178324729219ULL);
|
||||||
|
|
||||||
|
BEAST_EXPECT(xxhasher::test > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -144,6 +150,8 @@ public:
|
|||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
static_cast<xxhasher::result_type>(hasher) ==
|
static_cast<xxhasher::result_type>(hasher) ==
|
||||||
16189862915636005281ULL);
|
16189862915636005281ULL);
|
||||||
|
|
||||||
|
BEAST_EXPECT(xxhasher::test > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -162,6 +170,8 @@ public:
|
|||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
static_cast<xxhasher::result_type>(hasher) ==
|
static_cast<xxhasher::result_type>(hasher) ==
|
||||||
15296278154063476002ULL);
|
15296278154063476002ULL);
|
||||||
|
|
||||||
|
BEAST_EXPECT(xxhasher::test > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -180,6 +190,8 @@ public:
|
|||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
static_cast<xxhasher::result_type>(hasher) ==
|
static_cast<xxhasher::result_type>(hasher) ==
|
||||||
17285302196561698791ULL);
|
17285302196561698791ULL);
|
||||||
|
|
||||||
|
BEAST_EXPECT(xxhasher::test > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -210,6 +222,8 @@ public:
|
|||||||
|
|
||||||
BEAST_EXPECT(xxhashResult1 == xxhashResult2);
|
BEAST_EXPECT(xxhashResult1 == xxhashResult2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BEAST_EXPECT(xxhasher::test > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user