+ EXPECT_NE(hash_combine(d),
+ hash_combine(c));
+
+ // With composition
+ EXPECT_EQ(hash_combine(a, b),
+ hash_combine(c, b));
+ // Test order dependence
+ EXPECT_NE(hash_combine(a, b),
+ hash_combine(b, a));
+
+ // Test with custom hasher
+ EXPECT_EQ(hash_combine_test(a),
+ hash_combine_test(c));
+ // 3 + 4 != 1 + 2
+ EXPECT_NE(hash_combine_test(b),
+ hash_combine_test(c));
+ // This time, thanks to a terrible hash function, these are equal
+ EXPECT_EQ(hash_combine_test(d),
+ hash_combine_test(c));
+ // With composition
+ EXPECT_EQ(hash_combine_test(a, b),
+ hash_combine_test(c, b));
+ // Test order dependence
+ EXPECT_NE(hash_combine_test(a, b),
+ hash_combine_test(b, a));
+ // Again, 1 + 2 == 2 + 1
+ EXPECT_EQ(hash_combine_test(a, b),
+ hash_combine_test(d, b));