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

Method TestStdCompatibility

util/generic/ptr_ut.cpp:942–966  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940}
941
942void TPointerTest::TestStdCompatibility() {
943 {
944 TSimpleSharedPtr<int> ptr = MakeSimpleShared<int>(5);
945 UNIT_ASSERT_TYPES_EQUAL(decltype(ptr)::element_type, int);
946 UNIT_ASSERT_VALUES_EQUAL(ptr.get(), ptr.Get());
947 }
948
949 {
950 TAtomicSharedPtr<int> ptr = MakeAtomicShared<int>(5);
951 UNIT_ASSERT_TYPES_EQUAL(decltype(ptr)::element_type, int);
952 UNIT_ASSERT_VALUES_EQUAL(ptr.get(), ptr.Get());
953 }
954
955 {
956 TAutoPtr<int> ptr = MakeHolder<int>(5);
957 UNIT_ASSERT_TYPES_EQUAL(decltype(ptr)::element_type, int);
958 UNIT_ASSERT_VALUES_EQUAL(ptr.get(), ptr.Get());
959 }
960
961 {
962 TIntrusivePtr<TOp> ptr;
963 UNIT_ASSERT_TYPES_EQUAL(decltype(ptr)::element_type, TOp);
964 UNIT_ASSERT_VALUES_EQUAL(ptr.get(), ptr.Get());
965 }
966}
967
968void TPointerTest::TestGetRef() {
969 {

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected