diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-08-17 05:06:09 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-08-17 05:06:09 +0000 |
commit | daf715e2ccb53bd88c6f374840b5d41e72c61c90 (patch) | |
tree | d868168b9ae9fc6fd4797f361d3596e3bd3197fc /test/unit/context/cdmap_black.h | |
parent | 229ab1aca6e89315a07899b093951d8f4f9d0c02 (diff) |
Add "no trash" CDMap elements, so that CDMap elements can themselves
be allocated in context memory. CDMap black-box test extended.
Diffstat (limited to 'test/unit/context/cdmap_black.h')
-rw-r--r-- | test/unit/context/cdmap_black.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/unit/context/cdmap_black.h b/test/unit/context/cdmap_black.h index 7b8953dc0..37beb5054 100644 --- a/test/unit/context/cdmap_black.h +++ b/test/unit/context/cdmap_black.h @@ -930,9 +930,8 @@ public: }; void testMapOfLists() { - try{ - //Debug.on("gc"); - //Debug.on("context"); + //Debug.on("gc"); + //Debug.on("context"); CDMap<int, CDList<myint>*, int_hasher> map(d_context); @@ -1055,6 +1054,13 @@ public: } TS_ASSERT(d_context->getLevel() == 0); - } catch(Exception& e) { cout << e << std::endl; throw e; } + } + + void testCmmElementsAtLevel0() { + // this was crashing + + CDMap<int, int*, int_hasher> map(d_context); + int* a = (int*)d_context->getCMM()->newData(sizeof(int)); + map.insertDataFromContextMemory(1, a); } }; |