summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llinstancetracker_test.cpp
AgeCommit message (Collapse)Author
2012-02-27Automated merge with file:///Users/nat/linden/viewer-leap-daggyNat Goodspeed
2012-02-27Add LLInstanceTracker test for exception in subclass constructor.Nat Goodspeed
We want to verify the sequence: LLInstanceTracker constructor adds instance to underlying container Subclass constructor throws exception LLInstanceTracker destructor removes instance from underlying container.
2012-02-27Make LLInstanceTracker<T, T*>::getInstance(T*) validate passed T*.Nat Goodspeed
For the T* specialization (no string, or whatever, key), the original getInstance() method simply returned the passed-in T* value. It was defined, as the comments noted, for completeness of the analogy with the keyed LLInstanceTracker specialization. It turns out, though, that getInstance(T*) can still be useful to ask whether the T* you have in hand still references a valid T instance. Support that usage.
2011-09-07STORM-1541: Add LLInstanceTracker tests for active-iterator asserts.Nat Goodspeed
The recent class-static LLInstanceTracker::instance_iter and key_iter reference count is intended to guard against deleting an instance of an LLInstanceTracker subclass during iteration. Add tests for that functionality.
2011-08-24Re-add 3 llinstancetracker tests disabled by changeset 1ead63777bf6.Nat Goodspeed
Fix LLInstanceTracker::key_iter constructor param; accepting InstanceMap::iterator by non-const reference relied on Microsoft extension that accepts non-const reference to an rvalue. Given typical iterator implementation, simply accept by value instead, which makes gcc happy too.
2011-07-27fix for gccRichard Nelson
2011-07-26fixed buildRichard Nelson
2011-07-26removed last vestiges of llinstancetracerscopedguardRichard Nelson
2010-08-13Change license from GPL to LGPL (version 2.1)Oz Linden
2010-02-06EXT-5055 LLInstanceTracker promotes some dangerous patterns - detect themTofu Linden
2009-11-10Enhance LLInstanceTracker variants to be more uniform.Nat Goodspeed
For both the (so far unused) generic KEY form and the KEY = T* form, provide key_iter, beginKeys(), endKeys(). Change instance_iter so that when dereferenced, it gives you a T& rather than a T*, to be more harmonious with a typical STL container. (You parameterize LLInstanceTracker with T, not with T*.) Fix existing usage in llfasttimer.cpp and lltimer.cpp to agree. For the KEY = T* specialization, add T* getInstance(T*) so client isn't forced to know which variant was used. Add unit tests for uniformity of public operations on both variants.