activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: fix unit test failure
Date Tue, 03 Sep 2013 22:28:38 GMT
Updated Branches:
  refs/heads/trunk 60075661a -> 262af8054


fix unit test failure

Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/262af805
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/262af805
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/262af805

Branch: refs/heads/trunk
Commit: 262af8054d16d621d497762fa11e1812dcf61f8a
Parents: 6007566
Author: Timothy Bish <tabish121@gmai.com>
Authored: Tue Sep 3 18:28:36 2013 -0400
Committer: Timothy Bish <tabish121@gmai.com>
Committed: Tue Sep 3 18:28:36 2013 -0400

----------------------------------------------------------------------
 .../src/test/decaf/io/FilterInputStreamTest.cpp         | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/262af805/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp b/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp
index 5323f82..c030241 100644
--- a/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp
+++ b/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp
@@ -57,7 +57,7 @@ namespace {
             return this->closed;
         }
 
-        virtual int available() {
+        virtual int available() const {
             if( isClosed() ) {
                 throw IOException(
                     __FILE__, __LINE__,
@@ -133,11 +133,13 @@ namespace {
 void FilterInputStreamTest::testAvailable() {
 
     std::string testStr = "TEST12345678910";
-    MyInputStream myStream( testStr );
-    FilterInputStream is( &myStream );
+    MyInputStream myStream(testStr);
+    FilterInputStream is(&myStream);
+
+    int available = is.available();
 
-    CPPUNIT_ASSERT_MESSAGE( "Returned incorrect number of available bytes",
-                            is.available() == (int)testStr.length() );
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("Returned incorrect number of available bytes",
+                                 (int)testStr.length(), available);
 }
 
 ////////////////////////////////////////////////////////////////////////////////


Mime
View raw message