RefCount: Add a unit test for reference counting pointers.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 10 Jan 2011 11:56:42 +0000 (03:56 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 10 Jan 2011 11:56:42 +0000 (03:56 -0800)
commitdc64732dee916535b555cbddf4c7590c14e72b9e
tree09c3b2b442d9205392c477e785409bdfe37de4be
parent6f1187943cf78c2fd0334bd7e4372ae79a587fa4
RefCount: Add a unit test for reference counting pointers.

This test exercises each of the functions in the reference counting pointer
implementation individually (except get()) and verifies they have some
minimially expected behavior. It also checks that reference counted objects
are freed when their usage count goes to 0 in some basic situations,
specifically a pointer being set to NULL and a pointer being deleted.
src/unittest/SConscript
src/unittest/refcnttest.cc [new file with mode: 0644]