| 424 | } |
| 425 | |
| 426 | void 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 | |
| 436 | void TPointerTest::TestCopyOnWritePtr1() { |
| 437 | using TPtr = TCowPtr<TSimpleSharedPtr<int>>; |