feat(hash): add hash templates

This commit is contained in:
fallenoak 2020-11-15 13:20:10 -06:00
parent 399e3f02d6
commit ac1be572c4
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
7 changed files with 374 additions and 0 deletions

13
test/Hash.cpp Normal file
View file

@ -0,0 +1,13 @@
#include "storm/Hash.hpp"
#include "test/Test.hpp"
struct TestHashObject: TSHashObject<TestHashObject, HASHKEY_STRI> {
uint32_t index = 0;
};
TEST_CASE("TSHashTable", "[hash]") {
SECTION("constructs correctly") {
TSHashTable<TestHashObject, HASHKEY_STRI> hashTable;
REQUIRE(hashTable.Head() == nullptr);
}
}