diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-02-08 14:58:53 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-02-08 14:58:53 -0500 |
commit | 399d70eede54dff2ba6d14b33f85fdad4d33a662 (patch) | |
tree | ce922e0963b8d46c236c4320b574916507fa3b65 /indra/llcommon/tests/llinstancetracker_test.cpp | |
parent | 7e1932878563e5847335d5dcb66c9b23232c372c (diff) | |
parent | 19f4240f977fc26d97e686c4e3a1f13b063e191c (diff) |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/llcommon/tests/llinstancetracker_test.cpp')
-rw-r--r-- | indra/llcommon/tests/llinstancetracker_test.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/indra/llcommon/tests/llinstancetracker_test.cpp b/indra/llcommon/tests/llinstancetracker_test.cpp index 7415f2d33b..4bb3ec2922 100644 --- a/indra/llcommon/tests/llinstancetracker_test.cpp +++ b/indra/llcommon/tests/llinstancetracker_test.cpp @@ -138,23 +138,29 @@ namespace tut keys.insert(&one); keys.insert(&two); keys.insert(&three); - for (Unkeyed::key_iter ki(Unkeyed::beginKeys()), kend(Unkeyed::endKeys()); - ki != kend; ++ki) - { - ensure_equals("spurious key", keys.erase(*ki), 1); - } + { + Unkeyed::LLInstanceTrackerScopedGuard guard; + for (Unkeyed::key_iter ki(guard.beginKeys()), kend(guard.endKeys()); + ki != kend; ++ki) + { + ensure_equals("spurious key", keys.erase(*ki), 1); + } + } ensure_equals("unreported key", keys.size(), 0); KeySet instances; instances.insert(&one); instances.insert(&two); instances.insert(&three); - for (Unkeyed::instance_iter ii(Unkeyed::beginInstances()), iend(Unkeyed::endInstances()); - ii != iend; ++ii) - { - Unkeyed& ref = *ii; - ensure_equals("spurious instance", instances.erase(&ref), 1); - } + { + Unkeyed::LLInstanceTrackerScopedGuard guard; + for (Unkeyed::instance_iter ii(guard.beginInstances()), iend(guard.endInstances()); + ii != iend; ++ii) + { + Unkeyed& ref = *ii; + ensure_equals("spurious instance", instances.erase(&ref), 1); + } + } ensure_equals("unreported instance", instances.size(), 0); } } // namespace tut |