From 6352e8e3196f78388b6c771073f9e03eaa612673 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 20 Jun 2023 14:33:09 +1000 Subject: everything everywhere all at once --- source/test/hash_test.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 source/test/hash_test.cpp (limited to 'source/test/hash_test.cpp') diff --git a/source/test/hash_test.cpp b/source/test/hash_test.cpp new file mode 100644 index 0000000..173b241 --- /dev/null +++ b/source/test/hash_test.cpp @@ -0,0 +1,15 @@ +#include "StarHash.hpp" + +#include "gtest/gtest.h" + +TEST(HashTest, All) { + enum SomeEnum { Foo, Bar }; + + std::tuple testTuple(1, 2, false); + std::pair testPair(SomeEnum::Bar, 10); + + // Yeah yeah, I know that it's technically possible for the hash to be zero, + // but it's not! + EXPECT_NE(Star::hash()(testTuple), 0u); + EXPECT_NE(Star::hash()(testPair), 0u); +} -- cgit v1.2.3