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

Method TestMakeIntrusive

util/generic/ptr_ut.cpp:426–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426void TPointerTest::TestMakeIntrusive() {
427 {
428 UNIT_ASSERT_VALUES_EQUAL(0, TOp::Cnt);
429 auto p = MakeIntrusive<TOp>();
430 UNIT_ASSERT_VALUES_EQUAL(1, p->RefCount());
431 UNIT_ASSERT_VALUES_EQUAL(1, TOp::Cnt);
432 }
433 UNIT_ASSERT_VALUES_EQUAL(TOp::Cnt, 0);
434}
435
436void TPointerTest::TestCopyOnWritePtr1() {
437 using TPtr = TCowPtr<TSimpleSharedPtr<int>>;

Callers

nothing calls this directly

Calls 1

RefCountMethod · 0.45

Tested by

no test coverage detected