diff options
Diffstat (limited to 'modules/codec/tests')
-rw-r--r-- | modules/codec/tests/schema.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/codec/tests/schema.cpp b/modules/codec/tests/schema.cpp new file mode 100644 index 0000000..e1c2f82 --- /dev/null +++ b/modules/codec/tests/schema.cpp @@ -0,0 +1,13 @@ +#include <forstio/test/suite.h> +#include "../c++/schema.h" +#include "../c++/schema_hash.h" + +namespace { +SAW_TEST("Schema String Hash"){ + using namespace saw; + data<schema::String> str{"foo"}; + uint64_t hash = schema_hash<schema::String>::apply(0, str); + + SAW_EXPECT( hash == 0, std::string{"Hash is "} + std::to_string(hash) +", but should be 0."); +} +} |