--------------------- PatchSet 132 Date: 2002/11/06 09:51:13 Author: rbcollins Branch: refcount Tag: (none) Log: test a couple more desirable behaviours Members: test-suite/refcount.cc:1.1.2.1->1.1.2.2 Index: squid3/test-suite/refcount.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/test-suite/refcount.cc,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid3/test-suite/refcount.cc 6 Nov 2002 06:57:35 -0000 1.1.2.1 +++ squid3/test-suite/refcount.cc 6 Nov 2002 09:51:13 -0000 1.1.2.2 @@ -1,6 +1,6 @@ /* - * $Id: refcount.cc,v 1.1.2.1 2002/11/06 06:57:35 rbcollins Exp $ + * $Id: refcount.cc,v 1.1.2.2 2002/11/06 09:51:13 rbcollins Exp $ * * DEBUG: section xx Refcount allocator * AUTHOR: Robert Collins @@ -69,7 +69,16 @@ ToRefCount aForthObject (anObject); anObject = ToRefCount(NULL); aForthObject->someMethod(); + aForthObject = NULL; } } + /* Test creating an object, using it , and then making available as a + * refcounted one: + */ + { + _ToRefCount *aPointer = new _ToRefCount; + aPointer->someMethod(); + ToRefCount anObject(aPointer); + } return _ToRefCount::Instances == 0 ? 0 : 1; }