44 Message* history = NULL;
49 A(): mynum(num++) { *history <<
"A" << mynum <<
" ctor\n"; }
50 virtual ~
A() { *history <<
"A" << mynum <<
" dtor\n"; }
51 virtual void Use() { *history <<
"A" << mynum <<
" use\n"; }
59 B() { *history <<
"B" << mynum <<
" ctor\n"; }
60 ~B() { *history <<
"B" << mynum <<
" dtor\n"; }
61 virtual void Use() { *history <<
"B" << mynum <<
" use\n"; }
68 history =
new Message;
71 virtual ~LinkedPtrTest() {
77 TEST_F(LinkedPtrTest, GeneralTest) {
79 linked_ptr<A> a0, a1,
a2;
91 linked_ptr<A> a3(
new A);
99 linked_ptr<A> a5(
new A);
103 linked_ptr<B> b0(
new B);
104 linked_ptr<A> a6(b0);
151 history->GetString().c_str());