From f528f24036698e2014f370f174abab286ef397b6 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 18 Jan 2024 13:03:38 +0100 Subject: codec: Changed hashing to crc32 and made the calculation constexpr --- modules/codec/tests/schema.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'modules/codec/tests/schema.cpp') diff --git a/modules/codec/tests/schema.cpp b/modules/codec/tests/schema.cpp index 871feb7..71e806d 100644 --- a/modules/codec/tests/schema.cpp +++ b/modules/codec/tests/schema.cpp @@ -17,7 +17,7 @@ template struct schema_hash_test> { static void check(){ using namespace saw; - uint64_t hash = schema_hash::apply(); + constexpr uint64_t hash = schema_hash::apply(); SAW_EXPECT( hash == expected, std::string{"Hash for "} + std::string{T::name.view()} + " is " + std::to_string(hash) +", but should be "+ std::to_string(expected) + "."); } }; @@ -49,20 +49,20 @@ using namespace saw::schema; SAW_TEST("Schema Hashes"){ using namespace saw; schema_hash_test_multi< - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair, - schema_test_pair + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair, + schema_test_pair >::check(); } } -- cgit v1.2.3