diff options
author | Carl C. Trieloff <cctrieloff@apache.org> | 2008-09-12 19:07:13 +0000 |
---|---|---|
committer | Carl C. Trieloff <cctrieloff@apache.org> | 2008-09-12 19:07:13 +0000 |
commit | 8beebcda720aff81b014584bded7e61b3e439a1e (patch) | |
tree | 979b8d016aabc845f018aee7102d7b3853f0fdb0 /qpid | |
parent | 0d3aecbd765846e7bdfd45850bbfe413c85eb6e0 (diff) | |
download | qpid-python-8beebcda720aff81b014584bded7e61b3e439a1e.tar.gz |
Corrected warning for unsigned
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@694776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid')
-rw-r--r-- | qpid/cpp/src/tests/ClusterMapTest.cpp | 58 | ||||
-rw-r--r-- | qpid/cpp/src/tests/cluster_test.cpp | 8 |
2 files changed, 33 insertions, 33 deletions
diff --git a/qpid/cpp/src/tests/ClusterMapTest.cpp b/qpid/cpp/src/tests/ClusterMapTest.cpp index 344dd71eb5..cce0efb69f 100644 --- a/qpid/cpp/src/tests/ClusterMapTest.cpp +++ b/qpid/cpp/src/tests/ClusterMapTest.cpp @@ -41,40 +41,40 @@ QPID_AUTO_TEST_CASE(testNotice) { BOOST_CHECK(!m.urlNotice(id(0), url("0-ready"))); // id(0) member, no dump. BOOST_CHECK(m.isMember(id(0))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 0); - BOOST_CHECK_EQUAL(m.memberCount(), 1); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)1); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); BOOST_CHECK_EQUAL(id(0), m.urlNotice(id(1), url("1-dump"))); // Newbie, needs dump BOOST_CHECK(m.isMember(id(0))); BOOST_CHECK(m.isDumpee(id(1))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 1); BOOST_CHECK_EQUAL(m.dumps(id(1)), 0); - BOOST_CHECK_EQUAL(m.memberCount(), 1); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 1); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)1); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)1); BOOST_CHECK(!m.urlNotice(id(1), url("1-ready"))); // id(1) is ready. BOOST_CHECK(m.isMember(id(0))); BOOST_CHECK(m.isMember(id(1))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 0); BOOST_CHECK_EQUAL(m.dumps(id(1)), 0); - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); BOOST_CHECK_EQUAL(id(0), m.urlNotice(id(2), url("2-dump"))); // id(2) needs dump BOOST_CHECK(m.isDumpee(id(2))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 1); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 1); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)1); BOOST_CHECK_EQUAL(id(1), m.urlNotice(id(3), url("3-dump"))); // 0 busy, dump to id(1). BOOST_CHECK(m.isDumpee(id(3))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 1); BOOST_CHECK_EQUAL(m.dumps(id(1)), 1); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)2); BOOST_CHECK_EQUAL(id(0), m.urlNotice(id(4), url("4-dump"))); // Equally busy, 0 is first on list. BOOST_CHECK_EQUAL(m.dumps(id(0)), 2); BOOST_CHECK_EQUAL(m.dumps(id(1)), 1); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 3); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)3); // My dumpees both complete BOOST_CHECK(!m.urlNotice(id(2), url("2-ready"))); @@ -83,14 +83,14 @@ QPID_AUTO_TEST_CASE(testNotice) { BOOST_CHECK(m.isMember(id(4))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 0); BOOST_CHECK_EQUAL(m.dumps(id(1)), 1); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 1); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)1); // Final dumpee completes. BOOST_CHECK(!m.urlNotice(id(3), url("3-ready"))); BOOST_CHECK(m.isMember(id(3))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 0); BOOST_CHECK_EQUAL(m.dumps(id(1)), 0); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); } @@ -101,48 +101,48 @@ QPID_AUTO_TEST_CASE(testLeave) { BOOST_CHECK(!m.urlNotice(id(1), url("1-ready"))); BOOST_CHECK_EQUAL(id(0), m.urlNotice(id(2), url("2-dump"))); BOOST_CHECK(!m.urlNotice(id(2), url("2-ready"))); - BOOST_CHECK_EQUAL(m.memberCount(), 3); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)3); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); m.leave(id(1)); - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); BOOST_CHECK(m.isMember(id(0))); BOOST_CHECK(m.isMember(id(2))); BOOST_CHECK_EQUAL(id(0), m.urlNotice(id(4), url("4-dump"))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 1); BOOST_CHECK(m.isDumpee(id(4))); - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 1); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)1); m.dumpFailed(id(4)); // Dumper detected a failure. BOOST_CHECK_EQUAL(m.dumps(id(0)), 0); BOOST_CHECK(!m.isDumpee(id(4))); BOOST_CHECK(!m.isMember(id(4))); - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); m.leave(id(4)); // Dumpee leaves, no-op since we already know it failed. - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); BOOST_CHECK_EQUAL(id(0), m.urlNotice(id(5), url("5-dump"))); BOOST_CHECK_EQUAL(m.dumps(id(0)), 1); BOOST_CHECK(m.isDumpee(id(5))); - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 1); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)1); m.leave(id(5)); // Dumpee detects failure and leaves cluster. BOOST_CHECK_EQUAL(m.dumps(id(0)), 0); BOOST_CHECK(!m.isDumpee(id(5))); BOOST_CHECK(!m.isMember(id(5))); - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); m.dumpFailed(id(5)); // Dumper reports failure - no op, we already know. - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 0); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)0); } QPID_AUTO_TEST_CASE(testToControl) { @@ -154,8 +154,8 @@ QPID_AUTO_TEST_CASE(testToControl) { m.urlNotice(id(3), url("3dump")); m.urlNotice(id(4), url("4dump")); - BOOST_CHECK_EQUAL(m.memberCount(), 2); - BOOST_CHECK_EQUAL(m.dumpeeCount(), 3); + BOOST_CHECK_EQUAL(m.memberCount(), (unsigned)2); + BOOST_CHECK_EQUAL(m.dumpeeCount(), (unsigned)3); ClusterMapBody b = m.toControl(); diff --git a/qpid/cpp/src/tests/cluster_test.cpp b/qpid/cpp/src/tests/cluster_test.cpp index da77d7405e..28ee439a5d 100644 --- a/qpid/cpp/src/tests/cluster_test.cpp +++ b/qpid/cpp/src/tests/cluster_test.cpp @@ -252,10 +252,10 @@ QPID_AUTO_TEST_CASE_EXPECTED_FAILURES(testCatchUpSharedState, 1) { BOOST_CHECK_EQUAL(m.getData(), "foo"); BOOST_CHECK(c1.subs.get(m, "q", TIME_SEC)); BOOST_CHECK_EQUAL(m.getData(), "bar"); - BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), 0); + BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), (unsigned)0); BOOST_CHECK(c1.subs.get(m, "p", TIME_SEC)); BOOST_CHECK_EQUAL(m.getData(), "poo"); - BOOST_CHECK_EQUAL(c1.session.queueQuery("p").getMessageCount(), 0); + BOOST_CHECK_EQUAL(c1.session.queueQuery("p").getMessageCount(), (unsigned)0); } QPID_AUTO_TEST_CASE(testStall) { @@ -276,7 +276,7 @@ QPID_AUTO_TEST_CASE(testStall) { // But it should not be on broker 0. boost::shared_ptr<broker::Queue> q0 = cluster.broker0->broker->getQueues().find("q"); BOOST_REQUIRE(q0); - BOOST_CHECK_EQUAL(q0->getMessageCount(), 0); + BOOST_CHECK_EQUAL(q0->getMessageCount(), (unsigned)0); // Now unstall and we should get the message. getGlobalCluster().unStall(); Message m; @@ -310,7 +310,7 @@ QPID_AUTO_TEST_CASE(testDumpConsumers) { // Verify that the queue has been drained on both brokers. // This proves that the consumer was replicated when the second broker joined. - BOOST_CHECK_EQUAL(a.session.queueQuery("q").getMessageCount(), 0); + BOOST_CHECK_EQUAL(a.session.queueQuery("q").getMessageCount(), (unsigned)0); } |