diff options
Diffstat (limited to 'modules/codec/tests/schema.cpp')
-rw-r--r-- | modules/codec/tests/schema.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
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<typename T, uint64_t expected> struct schema_hash_test<schema_test_pair<T,expected>> { static void check(){ using namespace saw; - uint64_t hash = schema_hash<T>::apply(); + constexpr uint64_t hash = schema_hash<T>::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::UInt8 , 17448981058701187403u>, - schema_test_pair<schema::UInt16, 17448981058701187400u>, - schema_test_pair<schema::UInt32, 17448981058701187398u>, - schema_test_pair<schema::UInt64, 17448981058701187394u>, - schema_test_pair<schema::Int8 , 856492552766770219u>, - schema_test_pair<schema::Int16, 856492552766770216u>, - schema_test_pair<schema::Int32, 856492552766770214u>, - schema_test_pair<schema::Int64, 856492552766770210u>, - schema_test_pair<schema::Float32, 14974566471626763725u>, - schema_test_pair<schema::Float64, 14974566471626763729u>, - schema_test_pair<schema::SignedInteger, 17576067307413535420u>, - schema_test_pair<schema::UnsignedInteger, 15327325027193222152u>, - schema_test_pair<schema::FloatingPoint, 18201377588738489119u>, - schema_test_pair<schema::String, 3005399793615731798u> + schema_test_pair<schema::UInt8 , 958523688>, + schema_test_pair<schema::UInt16, 3586362486>, + schema_test_pair<schema::UInt32, 147217277>, + schema_test_pair<schema::UInt64, 3054299356>, + schema_test_pair<schema::Int8 , 1991167534>, + schema_test_pair<schema::Int16, 2588715888>, + schema_test_pair<schema::Int32, 1195998331>, + schema_test_pair<schema::Int64, 4186165210>, + schema_test_pair<schema::Float32, 1968068318>, + schema_test_pair<schema::Float64, 3414484351>, + schema_test_pair<schema::SignedInteger, 2923333106>, + schema_test_pair<schema::UnsignedInteger, 3300532028>, + schema_test_pair<schema::FloatingPoint, 1860828258>, + schema_test_pair<schema::String, 1669061438> >::check(); } } |