DO NOT MERGE

This commit is contained in:
Bronek Kozicki
2025-08-08 17:43:45 +01:00
parent 205d2965da
commit 7d90d6311e
2 changed files with 16 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ class xxhasher
{
public:
using result_type = std::size_t;
static int volatile test;
private:
static_assert(sizeof(std::size_t) == 8, "requires 64-bit std::size_t");
@@ -143,6 +144,7 @@ public:
{
if (state_)
{
test = test + 1;
XXH3_freeState(state_);
}
}

View File

@@ -22,6 +22,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
namespace beast {
int volatile xxhasher::test = 0;
class XXHasher_test : public unit_test::suite
{
public:
@@ -102,6 +104,8 @@ public:
BEAST_EXPECT(
static_cast<xxhasher::result_type>(hasher) ==
17285302196561698791ULL);
BEAST_EXPECT(xxhasher::test > 0);
}
void
@@ -123,6 +127,8 @@ public:
BEAST_EXPECT(
static_cast<xxhasher::result_type>(hasher) ==
1865045178324729219ULL);
BEAST_EXPECT(xxhasher::test > 0);
}
void
@@ -144,6 +150,8 @@ public:
BEAST_EXPECT(
static_cast<xxhasher::result_type>(hasher) ==
16189862915636005281ULL);
BEAST_EXPECT(xxhasher::test > 0);
}
void
@@ -162,6 +170,8 @@ public:
BEAST_EXPECT(
static_cast<xxhasher::result_type>(hasher) ==
15296278154063476002ULL);
BEAST_EXPECT(xxhasher::test > 0);
}
void
@@ -180,6 +190,8 @@ public:
BEAST_EXPECT(
static_cast<xxhasher::result_type>(hasher) ==
17285302196561698791ULL);
BEAST_EXPECT(xxhasher::test > 0);
}
void
@@ -210,6 +222,8 @@ public:
BEAST_EXPECT(xxhashResult1 == xxhashResult2);
}
BEAST_EXPECT(xxhasher::test > 0);
}
void