|
25 | 25 | #include <optional> |
26 | 26 |
|
27 | 27 | using namespace llvm; |
| 28 | +using ::llvm::memprof::LineLocation; |
28 | 29 | using ::testing::EndsWith; |
29 | 30 | using ::testing::IsSubsetOf; |
| 31 | +using ::testing::Pair; |
30 | 32 | using ::testing::SizeIs; |
31 | 33 | using ::testing::UnorderedElementsAre; |
32 | 34 |
|
@@ -620,18 +622,18 @@ TEST_F(InstrProfTest, test_caller_callee_pairs) { |
620 | 622 | auto It = Pairs.find(0x123); |
621 | 623 | ASSERT_NE(It, Pairs.end()); |
622 | 624 | ASSERT_THAT(It->second, SizeIs(2)); |
623 | | - EXPECT_THAT(It->second[0], testing::Pair(testing::FieldsAre(1U, 2U), 0x234U)); |
624 | | - EXPECT_THAT(It->second[1], testing::Pair(testing::FieldsAre(5U, 6U), 0x345U)); |
| 625 | + EXPECT_THAT(It->second[0], Pair(LineLocation(1, 2), 0x234U)); |
| 626 | + EXPECT_THAT(It->second[1], Pair(LineLocation(5, 6), 0x345U)); |
625 | 627 |
|
626 | 628 | It = Pairs.find(0x234); |
627 | 629 | ASSERT_NE(It, Pairs.end()); |
628 | 630 | ASSERT_THAT(It->second, SizeIs(1)); |
629 | | - EXPECT_THAT(It->second[0], testing::Pair(testing::FieldsAre(3U, 4U), 0U)); |
| 631 | + EXPECT_THAT(It->second[0], Pair(LineLocation(3, 4), 0U)); |
630 | 632 |
|
631 | 633 | It = Pairs.find(0x345); |
632 | 634 | ASSERT_NE(It, Pairs.end()); |
633 | 635 | ASSERT_THAT(It->second, SizeIs(1)); |
634 | | - EXPECT_THAT(It->second[0], testing::Pair(testing::FieldsAre(7U, 8U), 0U)); |
| 636 | + EXPECT_THAT(It->second[0], Pair(LineLocation(7, 8), 0U)); |
635 | 637 | } |
636 | 638 |
|
637 | 639 | TEST_F(InstrProfTest, test_memprof_getrecord_error) { |
|
0 commit comments