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.
This commit is contained in:
Gabe Black
2011-01-10 03:56:42 -08:00
parent 6f1187943c
commit dc64732dee
2 changed files with 188 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ UnitTest('offtest', 'offtest.cc')
UnitTest('rangetest', 'rangetest.cc')
UnitTest('rangemaptest', 'rangemaptest.cc')
UnitTest('rangemultimaptest', 'rangemultimaptest.cc')
UnitTest('refcnttest', 'refcnttest.cc')
UnitTest('stattest', 'stattest.cc')
UnitTest('strnumtest', 'strnumtest.cc')
UnitTest('symtest', 'symtest.cc')