mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
20 lines
615 B
C++
20 lines
615 B
C++
#include "storm/String.hpp"
|
|
#include "test/Test.hpp"
|
|
|
|
TEST_CASE("SStrHashHT", "[string]") {
|
|
SECTION("hashes simple string correctly") {
|
|
auto hash = SStrHashHT("foo");
|
|
REQUIRE(hash == 1371562358u);
|
|
}
|
|
|
|
SECTION("hashes string with forward slash correctly") {
|
|
auto hash = SStrHashHT("foo/bar");
|
|
REQUIRE(hash == 2270424393u);
|
|
}
|
|
|
|
SECTION("hashes string with forward slash equivalent to back slash") {
|
|
auto hashForwardSlash = SStrHashHT("foo/bar");
|
|
auto hashBackSlash = SStrHashHT("foo\\bar");
|
|
REQUIRE(hashForwardSlash == hashBackSlash);
|
|
}
|
|
}
|