summaryrefslogtreecommitdiff
path: root/modules/codec/tests/schema.cpp
blob: df90eb17acde6ca9786bd016605748a964eca181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#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);
	uint64_t expected_hash = 1524024712123765130u;

	SAW_EXPECT( hash == expected_hash, std::string{"Hash is "} + std::to_string(hash) +", but should be 0.");
}
}