| 408 | } |
| 409 | |
| 410 | void TPointerTest::TestIntrusiveConstConvertion() { |
| 411 | using namespace NTestIntrusiveConvertion; |
| 412 | |
| 413 | TIntrusiveConstPtr<TAA> aa = new TAA; |
| 414 | |
| 415 | UNIT_ASSERT_VALUES_EQUAL(aa->RefCount(), 1); |
| 416 | TIntrusiveConstPtr<TA> a = aa; |
| 417 | UNIT_ASSERT_VALUES_EQUAL(aa->RefCount(), 2); |
| 418 | UNIT_ASSERT_VALUES_EQUAL(a->RefCount(), 2); |
| 419 | aa.Reset(); |
| 420 | UNIT_ASSERT_VALUES_EQUAL(a->RefCount(), 1); |
| 421 | |
| 422 | // test that Func(TIntrusiveConstPtr<TB>) doesn't participate in overload resolution |
| 423 | Func(aa); |
| 424 | } |
| 425 | |
| 426 | void TPointerTest::TestMakeIntrusive() { |
| 427 | { |