From ee3682bd2c4e339b72018c9013425a9ead613818 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sun, 27 Nov 2011 01:01:03 +0100 Subject: [PATCH] bug: fix pool tests --- src/pool/test/pool.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pool/test/pool.cc b/src/pool/test/pool.cc index d689660cf4..15f5f47eef 100644 --- a/src/pool/test/pool.cc +++ b/src/pool/test/pool.cc @@ -170,7 +170,10 @@ public: //Should be set to MAX_POOL -1 for (int i=0 ; i < 14999 ; i++) { - create_allocate(i,"A Test object"); + ostringstream name; + name << "A Test object " << i; + + create_allocate(i,name.str()); obj_lock = pool->get(i, true); CPPUNIT_ASSERT(obj_lock != 0); @@ -178,16 +181,22 @@ public: for (int i=14999 ; i < 15200 ; i++) //Works with just 1 cache line { - create_allocate(i,"A Test object"); + ostringstream name; + name << "A Test object " << i; + + create_allocate(i,name.str()); } for (int i=14999; i < 15200 ; i++) { + ostringstream name; + name << "A Test object " << i; + obj = pool->get(i, true); CPPUNIT_ASSERT(obj != 0); CPPUNIT_ASSERT(obj->number == i); - CPPUNIT_ASSERT(obj->text == "A Test object"); + CPPUNIT_ASSERT(obj->text == name.str()); obj->unlock(); }