llvm.org GIT mirror llvm / edf24a8
unittests/ADT/HashingTest.cpp: Temporarily disable a new test introduced in r151891, to appease msvc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151970 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 8 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4141
4242 namespace {
4343
44 #if _MSC_VER != 1600
4445 struct NonPOD {
4546 uint64_t x, y;
4647 NonPOD(uint64_t x, uint64_t y) : x(x), y(y) {}
4950 return hash_combine(obj.x, obj.y);
5051 }
5152 };
53 #endif
5254
5355
5456 TEST(HashingTest, HashValueBasicTest) {
8385 EXPECT_EQ(hash_value(std::make_pair(42, std::make_pair(43, 44))),
8486 hash_value(std::make_pair(std::make_pair(42, 43), 44)));
8587
88 #if _MSC_VER != 1600
8689 // Ensure that pairs which have padding bytes *inside* them don't get treated
8790 // this way.
8891 EXPECT_EQ(hash_combine('0', hash_combine(1ull, '2')),
9295 NonPOD obj1(1, 2), obj2(3, 4), obj3(5, 6);
9396 EXPECT_EQ(hash_combine(obj1, hash_combine(obj2, obj3)),
9497 hash_value(std::make_pair(obj1, std::make_pair(obj2, obj3))));
98 #endif
9599 }
96100
97101 template T *begin(T (&arr)[N]) { return arr; }