activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r590773 - in /activemq/activemq-cpp/decaf/trunk/src: main/decaf/io/BufferedInputStream.cpp test/decaf/io/BufferedInputStreamTest.cpp
Date Wed, 31 Oct 2007 18:17:14 GMT
Author: tabish
Date: Wed Oct 31 11:17:13 2007
New Revision: 590773

URL: http://svn.apache.org/viewvc?rev=590773&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-136

Modified:
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp
    activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp?rev=590773&r1=590772&r2=590773&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp Wed Oct 31
11:17:13 2007
@@ -162,6 +162,7 @@
 
             // Increment the head position.
             head += bytesToSkip;
+            totalSkipped += bytesToSkip;
 
             // If the buffer is now empty, reset the positions to the
             // head of the buffer.

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp?rev=590773&r1=590772&r2=590773&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp Wed Oct
31 11:17:13 2007
@@ -36,22 +36,22 @@
         // Create buffer with exact size of data
         BufferedInputStream is( &myStream, testStr.length() );
 
-//        // Ensure buffer gets filled by evaluating one read
-//        is.read();
-//
-//        // Read the remaining buffered characters, no IOException should
-//        // occur.
-//        is.skip( testStr.length() - 2 );
-//        is.read();
-//        try {
-//            // is.read should now throw an exception because it will have to
-//            // be filled.
-//            is.read();
-//        } catch (IOException& e) {
-//            exceptionFired = true;
-//        }
-//
-//        CPPUNIT_ASSERT_MESSAGE( "Exception should have been triggered by read()", exceptionFired
);
+        // Ensure buffer gets filled by evaluating one read
+        is.read();
+
+        // Read the remaining buffered characters, no IOException should
+        // occur.
+        is.skip( testStr.length() - 2 );
+        is.read();
+        try {
+            // is.read should now throw an exception because it will have to
+            // be filled.
+            is.read();
+        } catch (IOException& e) {
+            exceptionFired = true;
+        }
+
+        CPPUNIT_ASSERT_MESSAGE( "Exception should have been triggered by read()", exceptionFired
);
 
     } catch (IOException& e) {
         e.printStackTrace();



Mime
View raw message