MCPcopy Create free account
hub / github.com/catboost/catboost / TestComparison

Method TestComparison

util/generic/ptr_ut.cpp:726–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724}
725
726void 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
746template <class T, class TRefCountedPtr>
747void TPointerTest::TestRefCountedPtrsInHashSetImpl() {

Callers

nothing calls this directly

Calls 1

TestPtrComparisonFunction · 0.85

Tested by

no test coverage detected