blob: a49f1b46b13f62dee0f733b0d1aada15a7878a8c [file] [log] [blame]
William A. Kennington III403cda22022-12-12 15:52:35 -08001#include <stdplus/hash.hpp>
2
William A. Kennington III85149ee2023-01-03 18:15:47 -08003#include <array>
William A. Kennington III403cda22022-12-12 15:52:35 -08004#include <string>
William A. Kennington IIIb07a2eb2023-01-03 18:14:40 -08005#include <tuple>
William A. Kennington III403cda22022-12-12 15:52:35 -08006
7#include <gtest/gtest.h>
8
9namespace stdplus
10{
11
12TEST(HashMulti, Basic)
13{
14 EXPECT_EQ(0, hashMulti());
15 EXPECT_EQ(2654435834, hashMulti(1, 2));
William A. Kennington III85149ee2023-01-03 18:15:47 -080016 int s[4] = {1, 2, 3, 4};
17 std::array<uint16_t, 2> a = {3, 4};
William A. Kennington IIIb07a2eb2023-01-03 18:14:40 -080018 std::tuple<std::string, int> t = {"s", 8};
William A. Kennington III85149ee2023-01-03 18:15:47 -080019 hashMulti(1, std::string("bacon"), nullptr, s, a, t);
William A. Kennington III403cda22022-12-12 15:52:35 -080020}
21
22} // namespace stdplus