#include <utility>
#include <vector>
#include "gmock/gmock.h"
#include "source/util/hash_combine.h"
namespace spvtools {
namespace utils {
namespace {
using HashCombineTest = ::testing::Test;
TEST(HashCombineTest, Identity) { EXPECT_EQ(hash_combine(0), 0); }
TEST(HashCombineTest, Variadic) {
EXPECT_EQ(hash_combine(hash_combine(hash_combine(0, 1), 2), 3),
hash_combine(0, 1, 2, 3));
}
TEST(HashCombineTest, Vector) {
EXPECT_EQ(hash_combine(0, std::vector<uint32_t>({1, 2, 3})),
hash_combine(0, 1, 2, 3));
}
} } }