| 724 | } |
| 725 | |
| 726 | void TPointerTest::TestComparison() { |
| 727 | THolder<A> ptr1(new A); |
| 728 | TAutoPtr<A> ptr2; |
| 729 | TSimpleSharedPtr<int> ptr3(new int(6)); |
| 730 | TIntrusivePtr<A> ptr4; |
| 731 | TIntrusiveConstPtr<A> ptr5 = ptr4; |
| 732 | |
| 733 | UNIT_ASSERT(ptr1 != nullptr); |
| 734 | UNIT_ASSERT(ptr2 == nullptr); |
| 735 | UNIT_ASSERT(ptr3 != nullptr); |
| 736 | UNIT_ASSERT(ptr4 == nullptr); |
| 737 | UNIT_ASSERT(ptr5 == nullptr); |
| 738 | |
| 739 | TestPtrComparison(ptr1); |
| 740 | TestPtrComparison(ptr2); |
| 741 | TestPtrComparison(ptr3); |
| 742 | TestPtrComparison(ptr4); |
| 743 | TestPtrComparison(ptr5); |
| 744 | } |
| 745 | |
| 746 | template <class T, class TRefCountedPtr> |
| 747 | void TPointerTest::TestRefCountedPtrsInHashSetImpl() { |
nothing calls this directly
no test coverage detected