You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/08/06 17:36:42 UTC

svn commit: r1369867 - /activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp

Author: tabish
Date: Mon Aug  6 15:36:42 2012
New Revision: 1369867

URL: http://svn.apache.org/viewvc?rev=1369867&view=rev
Log:
fix the test case.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp?rev=1369867&r1=1369866&r2=1369867&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/HashMapTest.cpp Mon Aug  6 15:36:42 2012
@@ -374,11 +374,12 @@ void HashMapTest::testPut() {
         Pointer< Iterator<int> > itr(intSet.iterator());
         while (itr->hasNext()) {
             int key = itr->next();
-            if (found = (key == myKey)) {
+            found = (key == myKey);
+            if (found) {
                 break;
             }
         }
-        CPPUNIT_ASSERT_MESSAGE("Should not find new key instance in hashashMap", !found);
+        CPPUNIT_ASSERT_MESSAGE("Should find new key instance in hashashMap", found);
 
         // Add a new key instance and check it is returned
         CPPUNIT_ASSERT_NO_THROW(map.remove(myKey));
@@ -388,7 +389,8 @@ void HashMapTest::testPut() {
         itr.reset(intSet.iterator());
         while (itr->hasNext()) {
             int key = itr->next();
-            if ((found = (key == myKey))) {
+            found = (key == myKey);
+            if (found) {
                 break;
             }
         }