activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r911562 [3/3] - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/commands/ main/activemq/io/ main/activemq/wireformat/openwire/ main/activemq/wireformat/openwire/marshal/v1/ main/activemq/wireformat/openwire/marshal/v2/ main/...
Date Thu, 18 Feb 2010 20:34:51 GMT
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketOutputStream.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketOutputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketOutputStream.cpp Thu Feb 18 20:34:48 2010
@@ -45,7 +45,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void SocketOutputStream::write( unsigned char c ) throw ( IOException ) {
-    write( &c, 0, 1 );
+    write( &c, 1, 0, 1 );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -58,52 +58,67 @@
             return;
         }
 
-        this->write( &buffer[0], 0, buffer.size() );
+        this->write( &buffer[0], buffer.size(), 0, buffer.size() );
     }
     DECAF_CATCH_RETHROW( IOException )
     DECAF_CATCHALL_THROW( IOException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SocketOutputStream::write( const unsigned char* buffer,
-                                std::size_t offset, std::size_t len )
-    throw ( IOException, lang::exceptions::NullPointerException ) {
+void SocketOutputStream::write( const unsigned char* buffer, std::size_t size,
+                                std::size_t offset, std::size_t length )
+    throw ( decaf::io::IOException,
+            decaf::lang::exceptions::NullPointerException,
+            decaf::lang::exceptions::IndexOutOfBoundsException ) {
 
-    if( len == 0 ) {
-        return;
-    }
-
-    if( buffer == NULL ) {
-        throw NullPointerException(
-            __FILE__, __LINE__,
-            "SocketOutputStream::write - passed buffer is null" );
-    }
-
-    if( closed ) {
-        throw IOException(
-            __FILE__, __LINE__,
-            "decaf::net::SocketOutputStream::write - This Stream has been closed." );
-    }
-
-    apr_size_t remaining = (apr_size_t)len;
-    apr_status_t result = APR_SUCCESS;
+    try{
 
-    const unsigned char* lbuffer = buffer + offset;
+        if( length == 0 ) {
+            return;
+        }
 
-    while( remaining > 0 && !closed ) {
-        // On input remaining is the bytes to send, after return remaining
-        // is the amount actually sent.
-        result = apr_socket_send( socket, (const char*)lbuffer, &remaining );
+        if( buffer == NULL ) {
+            throw NullPointerException(
+                __FILE__, __LINE__,
+                "SocketOutputStream::write - passed buffer is null" );
+        }
 
-        if( result != APR_SUCCESS || closed ) {
+        if( closed ) {
             throw IOException(
                 __FILE__, __LINE__,
-                "decaf::net::SocketOutputStream::write - %s",
-                SocketError::getErrorString().c_str() );
+                "SocketOutputStream::write - This Stream has been closed." );
         }
 
-        // move us to next position to write, or maybe end.
-        lbuffer += remaining;
-        remaining = len - remaining;
+        if( ( offset + length ) > size ) {
+            throw decaf::lang::exceptions::IndexOutOfBoundsException(
+                __FILE__, __LINE__,
+                "SocketOutputStream::write - given offset + length is greater than buffer size.");
+        }
+
+        apr_size_t remaining = (apr_size_t)length;
+        apr_status_t result = APR_SUCCESS;
+
+        const unsigned char* lbuffer = buffer + offset;
+
+        while( remaining > 0 && !closed ) {
+            // On input remaining is the bytes to send, after return remaining
+            // is the amount actually sent.
+            result = apr_socket_send( socket, (const char*)lbuffer, &remaining );
+
+            if( result != APR_SUCCESS || closed ) {
+                throw IOException(
+                    __FILE__, __LINE__,
+                    "decaf::net::SocketOutputStream::write - %s",
+                    SocketError::getErrorString().c_str() );
+            }
+
+            // move us to next position to write, or maybe end.
+            lbuffer += remaining;
+            remaining = length - remaining;
+        }
     }
+    DECAF_CATCH_RETHROW( IOException )
+    DECAF_CATCH_RETHROW( NullPointerException )
+    DECAF_CATCH_RETHROW( IndexOutOfBoundsException )
+    DECAF_CATCHALL_THROW( IOException )
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketOutputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketOutputStream.h?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketOutputStream.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketOutputStream.h Thu Feb 18 20:34:48 2010
@@ -63,17 +63,28 @@
             throw ( io::IOException );
 
         /**
-         * Writes an array of bytes to the output stream.
-         * @param buffer The array of bytes to write.
-         * @param offset the position to start writing in buffer.
-         * @param len The number of bytes from the buffer to be written.
-         * @throws IOException thrown if an error occurs.
+         * Writes an array of bytes to the output stream in order starting at buffer[offset]
+         * and proceeding until the number of bytes specified by the length argument are
+         * written or an error occurs.
+         *
+         * @param buffer
+         *      The array of bytes to write.
+         * @param size
+         *      The size of the buffer array passed.
+         * @param offset
+         *      The position to start writing in buffer.
+         * @param length
+         *      The number of bytes from the buffer to be written.
+         *
+         * @throws IOException if an I/O error occurs.
          * @throws NullPointerException thrown if buffer is Null.
+         * @throws IndexOutOfBoundsException if the offset + length > size.
          */
-        virtual void write( const unsigned char* buffer,
-                            std::size_t offset,
-                            std::size_t len )
-            throw ( io::IOException, lang::exceptions::NullPointerException );
+        virtual void write( const unsigned char* buffer, std::size_t size,
+                            std::size_t offset, std::size_t length )
+            throw ( decaf::io::IOException,
+                    decaf::lang::exceptions::NullPointerException,
+                    decaf::lang::exceptions::IndexOutOfBoundsException );
 
         /**
          * Flush - does nothing.

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp Thu Feb 18 20:34:48 2010
@@ -552,7 +552,9 @@
             buffer.str("");
         }
 
-        out->write( (const unsigned char*)writer.str().c_str(), 0, writer.str().length() );
+        std::size_t length = writer.str().length();
+
+        out->write( (const unsigned char*)writer.str().c_str(), length, 0, length );
         out->flush();
     }
     DECAF_CATCH_RETHROW( IOException )

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp Thu Feb 18 20:34:48 2010
@@ -171,7 +171,7 @@
 void StreamHandler::write( const std::string& value ) {
 
     try{
-        this->stream->write( (const unsigned char*)value.c_str(), 0, value.length() );
+        this->stream->write( (const unsigned char*)value.c_str(), value.length(), 0, value.length() );
     } catch( Exception& e ) {
         this->getErrorManager()->error(
             "Failed to write to the OutputStream", &e, ErrorManager::WRITE_FAILURE );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp Thu Feb 18 20:34:48 2010
@@ -69,7 +69,7 @@
     }
 
     for( int iy = 0; iy < numRuns; ++iy ){
-        bis.read( &bucket[0], 0, bufferSize );
+        bis.read( &bucket[0], bufferSize, 0, bufferSize );
         bis.reset();
     }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp Thu Feb 18 20:34:48 2010
@@ -61,7 +61,7 @@
     bos.reset();
 
     for( int iy = 0; iy < numRuns; ++iy ){
-        bos.write( buffer, 0, bufferSize );
+        bos.write( buffer, bufferSize, 0, bufferSize );
     }
     bos.reset();
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedInputStreamTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedInputStreamTest.cpp Thu Feb 18 20:34:48 2010
@@ -89,12 +89,12 @@
             return data.c_str()[pos++];
         }
 
-        virtual int read( unsigned char* buffer,
-                          std::size_t offset,
-                          std::size_t bufferSize )
-            throw (IOException){
+        virtual int read( unsigned char* buffer, std::size_t size, std::size_t offset, std::size_t length )
+            throw ( decaf::io::IOException,
+                    decaf::lang::exceptions::IndexOutOfBoundsException,
+                    decaf::lang::exceptions::NullPointerException ) {
 
-            std::size_t numToRead = std::min( bufferSize, available() );
+            std::size_t numToRead = std::min( length, available() );
 
             if( this->isThrowOnRead() ) {
                 throw IOException(
@@ -184,7 +184,6 @@
     MyInputStream myStream( testStr );
 
     // Test for method BufferedInputStream(InputStream, int)
-    bool exceptionFired = false;
     try {
 
         // Create buffer with exact size of data
@@ -296,7 +295,7 @@
         CPPUNIT_ASSERT_MESSAGE( "Wrong initial byte", 0 == is.read() );
         // Fill the buffer
         unsigned char buf[14];
-        is.read( &buf[0], 0, (std::size_t)14 );
+        is.read( &buf[0], 14, 0, (std::size_t)14 );
 
         // Read greater than the buffer
         CPPUNIT_ASSERT_MESSAGE( "Wrong block read data",
@@ -325,7 +324,7 @@
     unsigned char buf1[100];
     try {
         is.skip( 3000 );
-        is.read( buf1, 0, 100 );
+        is.read( buf1, 100, 0, 100 );
         CPPUNIT_ASSERT_MESSAGE(
             "Failed to read correct data",
             string( (const char*)&buf1[0], 100 ) == testStr.substr( 3000, 100 ) );
@@ -342,14 +341,14 @@
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw IOException",
-        bis.read( NULL, 0, (size_t)-1 ),
+        bis.read( NULL, 1, 0, (size_t)-1 ),
         IOException );
 
     bis.close();
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw IOException",
-        bis.read( NULL, 0, 1 ),
+        bis.read( NULL, 1, 0, 1 ),
         IOException );
 }
 
@@ -386,7 +385,7 @@
 
     unsigned char dummyBuf[20];
     memset( dummyBuf, 0, 20 );
-    std::size_t numRead = bufStream.read( dummyBuf, 0, 10 );
+    std::size_t numRead = bufStream.read( dummyBuf, 20, 0, 10 );
     CPPUNIT_ASSERT( numRead == 10 );
     CPPUNIT_ASSERT( strcmp( (char*)dummyBuf, "1234567891" ) == 0 );
 
@@ -427,7 +426,7 @@
 
     unsigned char dummyBuf[20];
     memset( dummyBuf, 0, 20 );
-    std::size_t numRead = bufStream.read( dummyBuf, 0, 10 );
+    std::size_t numRead = bufStream.read( dummyBuf, 20, 0, 10 );
     CPPUNIT_ASSERT( numRead == 10 );
     CPPUNIT_ASSERT( strcmp( (char*)dummyBuf, "1234567891" ) == 0 );
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/BufferedOutputStreamTest.cpp Thu Feb 18 20:34:48 2010
@@ -58,20 +58,22 @@
                 return;
             }
 
-            this->write( &buffer[0], 0, buffer.size() );
+            this->write( &buffer[0], buffer.size(), 0, buffer.size() );
         }
 
-        virtual void write( const unsigned char* buffer,
-                            std::size_t offset,
-                            std::size_t len ) throw (IOException){
+        virtual void write( const unsigned char* buffer, std::size_t size,
+                            std::size_t offset, std::size_t length )
+            throw ( decaf::io::IOException,
+                    decaf::lang::exceptions::NullPointerException,
+                    decaf::lang::exceptions::IndexOutOfBoundsException ) {
 
-            if( (pos + len) > 100 ){
+            if( (pos + length) > 100 ){
                 throw IOException();
             }
 
-            memcpy( this->buffer + pos, buffer+offset, len );
+            memcpy( this->buffer + pos, buffer+offset, length );
 
-            pos += len;
+            pos += length;
         }
 
         virtual void flush() throw (IOException){
@@ -126,7 +128,7 @@
     try {
         MyOutputStream myStream;
         BufferedOutputStream os( &myStream );
-        os.write( (unsigned char*)&testString[0], 0, 500 );
+        os.write( (unsigned char*)&testString[0], 500, 0, 500 );
     } catch( IOException& e ) {
         CPPUNIT_FAIL("Constrcutor test failed");
     }
@@ -138,7 +140,7 @@
     try {
         MyOutputStream myStream;
         BufferedOutputStream os( &myStream, (std::size_t)1024 );
-        os.write( (unsigned char*)&testString[0], 0, 500 );
+        os.write( (unsigned char*)&testString[0], 500, 0, 500 );
     } catch( IOException& e) {
         CPPUNIT_FAIL("IOException during Constrcutor test");
     }
@@ -151,7 +153,7 @@
 
         ByteArrayOutputStream myStream;
         BufferedOutputStream os( &myStream, (std::size_t)600 );
-        os.write( (unsigned char*)&testString[0], 0, 500 );
+        os.write( (unsigned char*)&testString[0], 500, 0, 500 );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE("Bytes not written after flush",
                 500 == myStream.size() );
@@ -167,18 +169,18 @@
 
         ByteArrayOutputStream baos;
         BufferedOutputStream os( &baos, (std::size_t)512 );
-        os.write( (unsigned char*)&testString[0], 0, 500 );
+        os.write( (unsigned char*)&testString[0], 500, 0, 500 );
 
         CPPUNIT_ASSERT_MESSAGE( "Bytes written, not buffered", NULL == baos.toByteArray() );
         os.flush();
         ByteArrayInputStream bais2( baos.toByteArray(), baos.size() );
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush", 500 == bais2.available() );
-        os.write( (unsigned char*)&testString[500], 0, 514 );
+        os.write( (unsigned char*)&testString[500], testString.size(), 0, 514 );
         ByteArrayInputStream bais3( baos.toByteArray(), baos.size() );
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written when buffer full",
                                 bais3.available() >= 1000);
         unsigned char wbytes[1014] = {0};
-        bais3.read( wbytes, 0, 1013 );
+        bais3.read( wbytes, 1014, 0, 1013 );
 
         CPPUNIT_ASSERT_MESSAGE(
             "Incorrect bytes written",
@@ -198,17 +200,17 @@
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw NullPointerException",
-        bos.write( nullByteArray, 0, (std::size_t)1 ),
+        bos.write( nullByteArray, 0, 0, (std::size_t)1 ),
         NullPointerException );
 
-    bos.write( byteArray, 0, 0 );
-    bos.write( byteArray, 0, 1 );
-    bos.write( byteArray, 0, 10 );
+    bos.write( byteArray, 10, 0, 0 );
+    bos.write( byteArray, 10, 0, 1 );
+    bos.write( byteArray, 10, 0, 10 );
     bos.close();
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw IOException",
-        bos.write( nullByteArray, 0, (std::size_t)1 ),
+        bos.write( nullByteArray, 0, 0, (std::size_t)1 ),
         IOException );
 }
 
@@ -220,12 +222,12 @@
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw NullPointerException",
-        bos.write( nullByteArray, 0, (std::size_t)1 ),
+        bos.write( nullByteArray, 0, 0, (std::size_t)1 ),
         IOException );
 
     CPPUNIT_ASSERT_NO_THROW_MESSAGE(
         "should not throw NullPointerException",
-        bos.write( nullByteArray, 0, (std::size_t)0 ) );
+        bos.write( nullByteArray, 0, 0, (std::size_t)0 ) );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -236,12 +238,12 @@
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw IOException",
-        bos.write( nullByteArray, 0, (std::size_t)1 ),
+        bos.write( nullByteArray, 0, 0, (std::size_t)1 ),
         IOException );
 
     CPPUNIT_ASSERT_NO_THROW_MESSAGE(
         "should not throw NullPointerException",
-        bos.write( nullByteArray, 0, (std::size_t)0 ) );
+        bos.write( nullByteArray, 0, 0, (std::size_t)0 ) );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -252,16 +254,16 @@
 
     CPPUNIT_ASSERT_NO_THROW_MESSAGE(
         "should not throw IOException",
-        bos.write( byteArray, 0, (std::size_t)0 ) );
+        bos.write( byteArray, 10, 0, (std::size_t)0 ) );
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw IOException",
-        bos.write( byteArray, 0, (std::size_t)1 ),
+        bos.write( byteArray, 10, 0, (std::size_t)1 ),
         IOException );
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw IOException",
-        bos.write( byteArray, 0, (std::size_t)10 ),
+        bos.write( byteArray, 10, 0, (std::size_t)10 ),
         IOException );
 }
 
@@ -271,16 +273,16 @@
     BufferedOutputStream bos( NULL, (std::size_t)1 );
     unsigned char byteArray[10];
 
-    bos.write( byteArray, 0, 0 );
+    bos.write( byteArray, 0, 0, 0 );
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw NullPointerException",
-        bos.write( byteArray, 0, 2 ),
+        bos.write( byteArray, 10 , 0, 2 ),
         IOException );
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "should throw NullPointerException",
-        bos.write( byteArray, 0, 10 ),
+        bos.write( byteArray, 10, 0, 10 ),
         IOException );
 }
 
@@ -298,7 +300,7 @@
         ByteArrayInputStream bais2( baos.toByteArray(), baos.size() );
         CPPUNIT_ASSERT_MESSAGE( "Byte not written after flush", 1 == bais2.available() );
         unsigned char wbytes[10];
-        bais2.read( wbytes, 0, 1 );
+        bais2.read( wbytes, 10, 0, 1 );
         CPPUNIT_ASSERT_MESSAGE( "Incorrect byte written", 't' == wbytes[0] );
 
     } catch( IOException& e) {
@@ -322,7 +324,7 @@
     // This time the T should have been written.
     CPPUNIT_ASSERT( strcmp( buffer, "T" ) == 0 );
 
-    bufStream.write( (unsigned char*)"ST", 0, 2 );
+    bufStream.write( (unsigned char*)"ST", 2, 0, 2 );
     // This time the ES should have been written.
     CPPUNIT_ASSERT( strcmp( buffer, "TES" ) == 0 );
 
@@ -338,7 +340,7 @@
 
     const char* buffer = myStream.getBuffer();
 
-    bufStream.write( (unsigned char*)"TEST", 0, 4 );
+    bufStream.write( (unsigned char*)"TEST", 4, 0, 4 );
 
     // Should not be written yet.
     CPPUNIT_ASSERT( strcmp( buffer, "" ) == 0 );
@@ -346,8 +348,8 @@
     bufStream.flush();
     CPPUNIT_ASSERT( strcmp( buffer, "TEST" ) == 0 );
 
-    bufStream.write( (unsigned char*)"TEST", 0, 4 );
-    bufStream.write( (unsigned char*)"12345678910", 0, 11);
+    bufStream.write( (unsigned char*)"TEST", 4, 0, 4 );
+    bufStream.write( (unsigned char*)"12345678910", 11, 0, 11 );
 
     CPPUNIT_ASSERT( strcmp( buffer, "TESTTEST123456" ) == 0 );
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayInputStreamTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayInputStreamTest.cpp Thu Feb 18 20:34:48 2010
@@ -156,7 +156,7 @@
 
     unsigned char buf1[20];
     is.skip(50);
-    is.read( buf1, 0, 20 );
+    is.read( buf1, 20, 0, 20 );
     CPPUNIT_ASSERT_MESSAGE(
         "Failed to read correct data",
         string( (const char*)buf1, 20 ) == string( (const char*)&testBuffer[50], 20) );
@@ -171,7 +171,7 @@
 
     unsigned char buf[10];
     memset( buf, 'b', 10 );
-    is.read( buf, 5, 5 );
+    is.read( buf, 10, 5, 5 );
 
     CPPUNIT_ASSERT_MESSAGE(
         "Failed to read correct data",
@@ -179,7 +179,7 @@
 
     // Try for an EOF
     is.skip( 5 );
-    CPPUNIT_ASSERT( is.read( buf, 5, 5 ) == -1 );
+    CPPUNIT_ASSERT( is.read( buf, 10, 5, 5 ) == -1 );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -194,7 +194,7 @@
 
     unsigned char buf1[10];
     is.skip(100);
-    is.read( buf1, 0, 10 );
+    is.read( buf1, 10, 0, 10 );
 
     CPPUNIT_ASSERT_MESSAGE(
         "Failed to skip to correct position",
@@ -233,7 +233,7 @@
 
     buffer[5] = '\0';
 
-    CPPUNIT_ASSERT( stream_a.read(buffer, 0, 5) == 5 );
+    CPPUNIT_ASSERT( stream_a.read(buffer, 6, 0, 5) == 5 );
     CPPUNIT_ASSERT( std::string((const char*)buffer) == std::string("teste") );
     CPPUNIT_ASSERT( stream_a.available() == 0 );
 
@@ -241,8 +241,8 @@
 
     memset(buffer, 0, 6);
 
-    CPPUNIT_ASSERT( stream_a.read(buffer, 0, 3) == 3 );
-    CPPUNIT_ASSERT( stream_a.read(&buffer[3], 0, 2) == 2 );
+    CPPUNIT_ASSERT( stream_a.read(buffer, 6, 0, 3) == 3 );
+    CPPUNIT_ASSERT( stream_a.read(&buffer[3], 3, 0, 2) == 2 );
     CPPUNIT_ASSERT( std::string((const char*)buffer) == std::string("teste") );
 
     stream_a.close();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ByteArrayOutputStreamTest.cpp Thu Feb 18 20:34:48 2010
@@ -54,7 +54,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ByteArrayOutputStreamTest::testReset() {
     ByteArrayOutputStream baos;
-    baos.write( (unsigned char*)&testString[0], 0, 100 );
+    baos.write( (unsigned char*)&testString[0], testString.size(), 0, 100 );
     baos.reset();
     CPPUNIT_ASSERT_MESSAGE("reset failed", 0 == baos.size() );
 }
@@ -62,7 +62,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ByteArrayOutputStreamTest::testSize() {
     ByteArrayOutputStream baos;
-    baos.write( (unsigned char*)&testString[0], 0, 100 );
+    baos.write( (unsigned char*)&testString[0], testString.size(), 0, 100 );
     CPPUNIT_ASSERT_MESSAGE("size test failed", 100 == baos.size());
     baos.reset();
     CPPUNIT_ASSERT_MESSAGE("size test failed", 0 == baos.size());
@@ -72,7 +72,7 @@
 void ByteArrayOutputStreamTest::testToByteArray() {
     const unsigned char* bytes = NULL;
     ByteArrayOutputStream baos;
-    baos.write( (unsigned char*)&testString[0], 0, testString.length() );
+    baos.write( (unsigned char*)&testString[0], testString.size(), 0, testString.length() );
     bytes = baos.toByteArray();
     for( std::size_t i = 0; i < testString.length(); i++) {
         CPPUNIT_ASSERT_MESSAGE("Error in byte array", bytes[i] == testString.at(i) );
@@ -83,7 +83,7 @@
 void ByteArrayOutputStreamTest::testToString() {
 
     ByteArrayOutputStream baos;
-    baos.write( (unsigned char*)&testString[0], 0, testString.length() );
+    baos.write( (unsigned char*)&testString[0], testString.size(), 0, testString.length() );
     CPPUNIT_ASSERT_MESSAGE( "Returned incorrect String",
                             baos.toString() == testString );
 }
@@ -101,7 +101,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ByteArrayOutputStreamTest::testWrite2() {
     ByteArrayOutputStream baos;
-    baos.write( (unsigned char*)&testString[0], 0, 100 );
+    baos.write( (unsigned char*)&testString[0], testString.size(), 0, 100 );
     const unsigned char* bytes = baos.toByteArray();
     CPPUNIT_ASSERT_MESSAGE("Wrote incorrect bytes",
             string((const char*)bytes, baos.size() ) == testString.substr(0, 100) );
@@ -110,7 +110,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 void ByteArrayOutputStreamTest::testWrite3() {
     ByteArrayOutputStream baos;
-    baos.write( (unsigned char*)&testString[0], 50, 100 );
+    baos.write( (unsigned char*)&testString[0], testString.size(), 50, 100 );
     const unsigned char* bytes = baos.toByteArray();
     CPPUNIT_ASSERT_MESSAGE("Wrote incorrect bytes",
             string((const char*)bytes, baos.size() ) == testString.substr(50, 100) );
@@ -120,7 +120,7 @@
 void ByteArrayOutputStreamTest::testWriteToDecaf_io_OutputStream() {
     ByteArrayOutputStream baos1;
     ByteArrayOutputStream baos2;
-    baos1.write( (unsigned char*)&testString[0], 0, 100 );
+    baos1.write( (unsigned char*)&testString[0], testString.size(), 0, 100 );
     baos1.writeTo( &baos2 );
     CPPUNIT_ASSERT_MESSAGE( "Returned incorrect String",
                             baos2.toString() == testString.substr(0, 100) );
@@ -141,7 +141,7 @@
 
     CPPUNIT_ASSERT( stream_a.size() == 0 );
 
-    stream_a.write((const unsigned char*)("abc"), 0, 3);
+    stream_a.write((const unsigned char*)("abc"), 3, 0, 3);
 
     CPPUNIT_ASSERT( stream_a.size() == 3 );
 
@@ -149,7 +149,7 @@
 
     CPPUNIT_ASSERT( stream_a.size() == 0 );
 
-    stream_a.write((const unsigned char*)("abc"), 0, 3);
+    stream_a.write((const unsigned char*)("abc"), 3, 0, 3);
 
     unsigned char buffer[4];
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp Thu Feb 18 20:34:48 2010
@@ -79,7 +79,7 @@
         os->close();
         openDataInputStream();
         unsigned char* result = new unsigned char[ testData.length() ];
-        is->read( result, 0, testData.length() );
+        is->read( result, testData.length(), 0, testData.length() );
         CPPUNIT_ASSERT_MESSAGE("Incorrect data read",
             string( (const char*)result, testData.size() ) == testData );
         delete [] result;
@@ -442,7 +442,7 @@
     //std::cout << "double Value = " << doubleVal << std::endl;
     CPPUNIT_ASSERT( doubleVal == 100.0 );
 
-    reader.read( arrayVal, 0, 3 );
+    reader.read( arrayVal, 3, 0, 3 );
     //std::cout << "char[0] Value = " << (int)arrayVal[0] << std::endl;
     CPPUNIT_ASSERT( arrayVal[0] == 'a' );
     //std::cout << "char[1] Value = " << (int)arrayVal[1] << std::endl;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp Thu Feb 18 20:34:48 2010
@@ -49,11 +49,11 @@
 void DataOutputStreamTest::testSize() {
 
     try {
-        os->write( (unsigned char*)&testData[0], 0, 150 );
+        os->write( (unsigned char*)&testData[0], testData.size(), 0, 150 );
         os->close();
         openDataInputStream();
         unsigned char rbuf[150];
-        is->read( rbuf, 0, 150 );
+        is->read( rbuf, 150, 0, 150 );
         is->close();
         CPPUNIT_ASSERT_MESSAGE("Incorrect size returned", 150 == os->size());
     } catch( IOException &e ) {
@@ -65,11 +65,11 @@
 void DataOutputStreamTest::testWrite1() {
 
     try {
-        os->write( (unsigned char*)&testData[0], 0, 150 );
+        os->write( (unsigned char*)&testData[0], testData.size(), 0, 150 );
         os->close();
         openDataInputStream();
         unsigned char* rbuf = new unsigned char[150];
-        is->read(rbuf, 0, 150);
+        is->read(rbuf, 150, 0, 150);
         is->close();
         CPPUNIT_ASSERT_MESSAGE("Incorrect bytes written",
             string( (const char*)rbuf, 150 ) == testData.substr( 0, 150 ) );
@@ -369,7 +369,7 @@
     writer.writeLong( longVal );
     writer.writeFloat( floatVal );
     writer.writeDouble( doubleVal );
-    writer.write( arrayVal, 0, 3 );
+    writer.write( arrayVal, 3, 0, 3 );
 
     const unsigned char* buffer = myStream.toByteArray();
     int ix = 0;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterInputStreamTest.cpp Thu Feb 18 20:34:48 2010
@@ -80,12 +80,12 @@
             return data.c_str()[pos++];
         }
 
-        virtual int read( unsigned char* buffer,
-                          std::size_t offset,
-                          std::size_t bufferSize )
-            throw (IOException){
+        virtual int read( unsigned char* buffer, std::size_t size, std::size_t offset, std::size_t length )
+            throw ( decaf::io::IOException,
+                    decaf::lang::exceptions::IndexOutOfBoundsException,
+                    decaf::lang::exceptions::NullPointerException ) {
 
-            std::size_t numToRead = std::min( bufferSize, available() );
+            std::size_t numToRead = std::min( length, available() );
 
             if( this->isThrowOnRead() ) {
                 throw IOException(
@@ -219,7 +219,7 @@
     FilterInputStream is( &myStream );
 
     unsigned char buf[30];
-    is.read( buf, 0, 30 );
+    is.read( buf, 30, 0, 30 );
     CPPUNIT_ASSERT_MESSAGE( "Failed to read correct data",
         string( (const char*)buf, 30 ) == testStr.substr(0, 30) );
 }
@@ -236,7 +236,7 @@
 
     unsigned char buf[100];
     is.skip(3000);
-    is.read( buf, 0, 100 );
+    is.read( buf, 100, 0, 100 );
     CPPUNIT_ASSERT_MESSAGE( "Failed to read correct data",
         string( (const char*)buf, 100 ) == testStr.substr( 3000, 100 ) );
 }
@@ -253,7 +253,7 @@
 
     unsigned char buf[100];
     is.skip( 1000 );
-    is.read( buf, 0, 100 );
+    is.read( buf, 100, 0, 100 );
     CPPUNIT_ASSERT_MESSAGE( "Failed to skip to correct position",
             string( (const char*)buf, 100 ) == testStr.substr( 1000, 100 ) );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/FilterOutputStreamTest.cpp Thu Feb 18 20:34:48 2010
@@ -43,7 +43,7 @@
     try {
         ByteArrayOutputStream baos;
         FilterOutputStream os( &baos );
-        os.write( (unsigned char*)&testString[0], 0, 500 );
+        os.write( (unsigned char*)&testString[0], testString.size(), 0, 500 );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush",
                                 500 == baos.size() );
@@ -59,7 +59,7 @@
     try {
         ByteArrayOutputStream baos;
         FilterOutputStream os( &baos );
-        os.write( (unsigned char*)&testString[0], 0, 500 );
+        os.write( (unsigned char*)&testString[0], testString.size(), 0, 500 );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush",
                                 500 == baos.size() );
@@ -75,13 +75,13 @@
     try {
         ByteArrayOutputStream baos;
         FilterOutputStream os( &baos );
-        os.write( (unsigned char*)&testString[0], 0, testString.size() );
+        os.write( (unsigned char*)&testString[0], testString.size(), 0, testString.size() );
         ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush",
                                 bais.available() == testString.length() );
         unsigned char* wbytes = new unsigned char[ testString.length() ];
-        bais.read( wbytes, 0, testString.length() );
+        bais.read( wbytes, testString.length(), 0, testString.length() );
         CPPUNIT_ASSERT_MESSAGE("Incorrect bytes written",
             testString == string( (const char*)wbytes, testString.length() ) );
 
@@ -102,7 +102,7 @@
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Byte not written after flush", 1 == bais.available() );
         unsigned char wbytes[1];
-        bais.read( wbytes, 0, 1 );
+        bais.read( wbytes, 1, 0, 1 );
         CPPUNIT_ASSERT_MESSAGE("Incorrect byte written", 't' == wbytes[0] );
     } catch( IOException& e ) {
         CPPUNIT_FAIL("Write test failed : " + e.getMessage());

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/InputStreamReaderTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/InputStreamReaderTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/InputStreamReaderTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/InputStreamReaderTest.cpp Thu Feb 18 20:34:48 2010
@@ -95,7 +95,7 @@
     CPPUNIT_ASSERT_EQUAL( ' ', (char) this->reader1->read() );
 
     std::vector<char> buffer( TEST_STRING.length() - 5 );
-    this->reader1->read( &buffer[0], 0, TEST_STRING.length() - 5 );
+    this->reader1->read( &buffer[0], buffer.size(), 0, TEST_STRING.length() - 5 );
     CPPUNIT_ASSERT_EQUAL( -1, this->reader1->read() );
 
     this->reader1->close();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.cpp Thu Feb 18 20:34:48 2010
@@ -82,11 +82,11 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OutputStreamWriterTest::testWriteCharArrayIntInt() {
+void OutputStreamWriterTest::testWriteCharArrayIntIntInt() {
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "Should throw an NullPointerException",
-        this->writer1->write( NULL, 1, 1 ),
+        this->writer1->write( NULL, 0, 1, 1 ),
         NullPointerException );
 
     this->writer1->write( TEST_STRING.c_str(), 1, 2 );
@@ -104,7 +104,7 @@
     // After the stream is closed, should throw IOException first
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "Should throw an IOException",
-        this->writer1->write( NULL, 0, 10 ),
+        this->writer1->write( NULL, 0, 0, 10 ),
         IOException );
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.h?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/OutputStreamWriterTest.h Thu Feb 18 20:34:48 2010
@@ -33,7 +33,7 @@
         CPPUNIT_TEST_SUITE( OutputStreamWriterTest );
         CPPUNIT_TEST( testClose );
         CPPUNIT_TEST( testFlush );
-        CPPUNIT_TEST( testWriteCharArrayIntInt );
+        CPPUNIT_TEST( testWriteCharArrayIntIntInt );
         CPPUNIT_TEST( testWriteChar );
         CPPUNIT_TEST( testWriteStringIntInt );
         CPPUNIT_TEST( testOutputStreamWriterOutputStream );
@@ -62,7 +62,7 @@
 
         void testClose();
         void testFlush();
-        void testWriteCharArrayIntInt();
+        void testWriteCharArrayIntIntInt();
         void testWriteChar();
         void testWriteStringIntInt();
         void testOutputStreamWriterOutputStream();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ReaderTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ReaderTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ReaderTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/ReaderTest.cpp Thu Feb 18 20:34:48 2010
@@ -59,9 +59,13 @@
             contents.clear();
         }
 
-        virtual int read( char* buffer, std::size_t offset, std::size_t length )
+    protected:
+
+        virtual int doReadArraySizeOffsetLength( char* buffer, std::size_t size,
+                                                 std::size_t offset, std::size_t length )
             throw( decaf::io::IOException,
-                   decaf::lang::exceptions::NullPointerException ) {
+                   decaf::lang::exceptions::NullPointerException,
+                   decaf::lang::exceptions::IndexOutOfBoundsException ) {
 
             if( contents.empty() ) {
                 return -1;
@@ -79,24 +83,6 @@
             return length;
         }
 
-        virtual int read( decaf::nio::CharBuffer* charBuffer )
-                 throw( decaf::io::IOException,
-                        decaf::lang::exceptions::NullPointerException,
-                        decaf::nio::ReadOnlyBufferException ) {
-
-            return Reader::read( charBuffer );
-        }
-
-        virtual int read() throw( decaf::io::IOException ) {
-            return Reader::read();
-        }
-
-        virtual int read( std::vector<char>& buffer )
-            throw( decaf::io::IOException ) {
-
-            return Reader::read( buffer );
-        }
-
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/WriterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/WriterTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/WriterTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/io/WriterTest.cpp Thu Feb 18 20:34:48 2010
@@ -59,49 +59,29 @@
         virtual void flush() throw( decaf::io::IOException ) {
         }
 
-        virtual void write( const char* buffer, std::size_t offset, std::size_t count )
-            throw( decaf::io::IOException, lang::exceptions::NullPointerException ) {
+        virtual void doWriteArraySizeOffsetLength(
+            const char* buffer, std::size_t size, std::size_t offset, std::size_t length )
+                throw( decaf::io::IOException,
+                       decaf::lang::exceptions::NullPointerException,
+                       decaf::lang::exceptions::IndexOutOfBoundsException ) {
 
             if( NULL == contents ) {
                 throw IOException( __FILE__, __LINE__, "Writer was already closed." );
             }
 
-            if( offset >= count ) {
-                throw IndexOutOfBoundsException( __FILE__, __LINE__, "offset must be less than count." );
+            if( offset + length > size ) {
+                throw IndexOutOfBoundsException(
+                    __FILE__, __LINE__, "offset + length must be less than size." );
             }
 
-            for( std::size_t i = 0; i < count; i++ ) {
+            for( std::size_t i = 0; i < length; i++ ) {
                 contents[this->offset + i] = buffer[offset + i];
             }
 
-            this->offset += count;
+            this->offset += length;
 
         }
 
-        virtual void write( char v )
-            throw( IOException ) {
-
-            Writer::write( v );
-        }
-
-        virtual void write( const std::vector<char>& buffer )
-            throw( IOException ) {
-
-            Writer::write( buffer );
-        }
-
-        virtual void write( const std::string& str )
-            throw( IOException ) {
-
-            Writer::write( str );
-        }
-
-        virtual void write( const std::string& str, std::size_t offset, std::size_t count )
-            throw( IOException, lang::exceptions::IndexOutOfBoundsException ) {
-
-            Writer::write( str, offset, count );
-        }
-
         std::vector<char> getContents() {
 
             std::vector<char> result( offset );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.h?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketFactoryTest.h Thu Feb 18 20:34:48 2010
@@ -97,7 +97,7 @@
                         io::InputStream* stream = socket->getInputStream();
                         memset( buf, 0, 1000 );
                         try{
-                            if( stream->read( buf, 0, 1000 ) == -1 ) {
+                            if( stream->read( buf, 1000, 0, 1000 ) == -1 ) {
                                 done = true;
                                 continue;
                             }
@@ -106,7 +106,7 @@
 
                             if( strcmp( (char*)buf, "reply" ) == 0 ){
                                 io::OutputStream* output = socket->getOutputStream();
-                                output->write( (unsigned char*)"hello", 0, strlen("hello" ) );
+                                output->write( (unsigned char*)"hello", strlen("hello"), 0, strlen("hello") );
                             }
 
                         }catch( io::IOException& ex ){
@@ -119,8 +119,7 @@
 
                     numClients--;
 
-                    synchronized(&mutex)
-                    {
+                    synchronized(&mutex) {
                         mutex.notifyAll();
                     }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.cpp Thu Feb 18 20:34:48 2010
@@ -98,7 +98,7 @@
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "don't reply";
-        stream->write( (unsigned char*)msg.c_str(), 0, msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), msg.length(), 0, msg.length() );
 
         Thread::sleep( 10 );
 
@@ -152,7 +152,7 @@
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "reply";
-        stream->write( (unsigned char*)msg.c_str(), 0, msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), msg.length(), 0, msg.length() );
 
         synchronized(&serverThread.mutex)
         {
@@ -163,7 +163,7 @@
         memset( buf, 0, 500 );
         io::InputStream* istream = client.getInputStream();
         CPPUNIT_ASSERT( istream->available() != 0 );
-        std::size_t numRead = istream->read( buf, 0, 500 );
+        std::size_t numRead = istream->read( buf, 500, 0, 500 );
         CPPUNIT_ASSERT( numRead == 5 );
         CPPUNIT_ASSERT( strcmp( (char*)buf, "hello" ) == 0 );
 
@@ -256,7 +256,7 @@
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "reply";
-        stream->write( (unsigned char*)msg.c_str(), 0, msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), msg.length(), 0, msg.length() );
 
         synchronized(&serverThread.mutex)
         {
@@ -266,7 +266,7 @@
         unsigned char buf[500];
         memset( buf, 0, 500 );
         io::InputStream* istream = client.getInputStream();
-        std::size_t numRead = istream->read( buf, 0, 500 );
+        std::size_t numRead = istream->read( buf, 500, 0, 500 );
         CPPUNIT_ASSERT( numRead == 5 );
         CPPUNIT_ASSERT( strcmp( (char*)buf, "hello" ) == 0 );
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.h?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/SocketTest.h Thu Feb 18 20:34:48 2010
@@ -105,7 +105,7 @@
                         memset( buf, 0, 1000 );
                         try{
 
-                            if( stream->read( buf, 0, 1000 ) == -1 ) {
+                            if( stream->read( buf, 1000, 0, 1000 ) == -1 ) {
                                 done = true;
                                 continue;
                             }
@@ -114,10 +114,9 @@
 
                             if( strcmp( (char*)buf, "reply" ) == 0 ){
                                 io::OutputStream* output = socket->getOutputStream();
-                                output->write( (unsigned char*)"hello", 0, strlen("hello" ) );
+                                output->write( (unsigned char*)"hello", strlen("hello"), 0, strlen("hello") );
 
-                                  synchronized(&mutex)
-                                  {
+                                  synchronized(&mutex) {
                                      mutex.notifyAll();
                                   }
                             }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp?rev=911562&r1=911561&r2=911562&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp Thu Feb 18 20:34:48 2010
@@ -18,264 +18,264 @@
 // All CPP Unit tests are registered in here so we can disable them and
 // enable them easily in one place.
 
-//#include <activemq/commands/BrokerInfoTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerInfoTest );
-//#include <activemq/commands/BrokerIdTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerIdTest );
-//#include <activemq/commands/ActiveMQTopicTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTopicTest );
-//#include <activemq/commands/ActiveMQTextMessageTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTextMessageTest );
-//#include <activemq/commands/ActiveMQTempTopicTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempTopicTest );
-//#include <activemq/commands/ActiveMQTempQueueTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempQueueTest );
-//#include <activemq/commands/ActiveMQQueueTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQQueueTest );
-//#include <activemq/commands/ActiveMQMessageTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMessageTest );
-//#include <activemq/commands/ActiveMQMapMessageTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMapMessageTest );
-//#include <activemq/commands/ActiveMQDestinationTest2.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQDestinationTest );
-//#include <activemq/commands/ActiveMQBytesMessageTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQBytesMessageTest );
-//#include <activemq/commands/ActiveMQStreamMessageTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQStreamMessageTest );
-//
-//#include <activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::BaseDataStreamMarshallerTest );
-//#include <activemq/wireformat/openwire/marshal/PrimitiveTypesMarshallerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::PrimitiveTypesMarshallerTest );
-//
-//#include <activemq/wireformat/openwire/utils/BooleanStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::BooleanStreamTest );
-//#include <activemq/wireformat/openwire/utils/HexTableTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::HexTableTest );
-//#include <activemq/wireformat/openwire/utils/OpenwireStringSupportTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::OpenwireStringSupportTest );
-//#include <activemq/wireformat/openwire/utils/MessagePropertyInterceptorTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::MessagePropertyInterceptorTest );
-//
-//#include <activemq/wireformat/openwire/OpenWireFormatTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::OpenWireFormatTest );
-//
-//#include <activemq/cmsutil/CmsAccessorTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsAccessorTest );
-//#include <activemq/cmsutil/CmsDestinationAccessorTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsDestinationAccessorTest );
-//#include <activemq/cmsutil/CmsTemplateTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsTemplateTest );
-//#include <activemq/cmsutil/DynamicDestinationResolverTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::DynamicDestinationResolverTest );
-//#include <activemq/cmsutil/SessionPoolTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::SessionPoolTest );
-//
-//#include <activemq/core/ActiveMQConnectionFactoryTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionFactoryTest );
-//#include <activemq/core/ActiveMQConnectionTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionTest );
-//#include <activemq/core/ActiveMQSessionTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQSessionTest );
-//#include <activemq/core/MessageDispatchChannelTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::MessageDispatchChannelTest );
-//
-//#include <activemq/state/ConnectionStateTrackerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTrackerTest );
-//#include <activemq/state/ConnectionStateTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTest );
-//#include <activemq/state/ConsumerStateTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConsumerStateTest );
-//#include <activemq/state/ProducerStateTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ProducerStateTest );
-//#include <activemq/state/SessionStateTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::SessionStateTest );
-//#include <activemq/state/TransactionStateTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::TransactionStateTest );
-//
-//#include <activemq/transport/failover/FailoverTransportTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::failover::FailoverTransportTest );
-//
-//#include <activemq/transport/correlator/ResponseCorrelatorTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::correlator::ResponseCorrelatorTest );
-//
-//#include <activemq/transport/mock/MockTransportFactoryTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::mock::MockTransportFactoryTest );
-//
-//#include <activemq/transport/inactivity/InactivityMonitorTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::inactivity::InactivityMonitorTest );
-//
-//#include <activemq/transport/TransportRegistryTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::TransportRegistryTest );
-//#include <activemq/transport/IOTransportTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::IOTransportTest );
-//
-//#include <activemq/exceptions/ActiveMQExceptionTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::exceptions::ActiveMQExceptionTest );
-//
-//#include <activemq/util/LongSequenceGeneratorTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::LongSequenceGeneratorTest );
-//#include <activemq/util/PrimitiveValueNodeTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueNodeTest );
-//#include <activemq/util/PrimitiveListTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveListTest );
-//#include <activemq/util/PrimitiveMapTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapTest );
-//#include <activemq/util/PrimitiveValueConverterTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueConverterTest );
-//#include <activemq/util/URISupportTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::URISupportTest );
-//#include <activemq/util/MemoryUsageTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MemoryUsageTest );
-//
-//#include <activemq/threads/DedicatedTaskRunnerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::DedicatedTaskRunnerTest );
-//#include <activemq/threads/CompositeTaskRunnerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::CompositeTaskRunnerTest );
-//
-//#include <activemq/wireformat/WireFormatRegistryTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::WireFormatRegistryTest );
-//
-//#include <decaf/internal/util/ByteArrayAdapterTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::ByteArrayAdapterTest );
-//#include <decaf/internal/util/TimerTaskHeapTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::TimerTaskHeapTest );
-//
-//#include <decaf/internal/nio/ByteArrayPerspectiveTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayPerspectiveTest );
-//#include <decaf/internal/nio/ByteArrayBufferTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayBufferTest );
-//#include <decaf/internal/nio/BufferFactoryTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::BufferFactoryTest );
-//#include <decaf/internal/nio/CharArrayBufferTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::CharArrayBufferTest );
-//#include <decaf/internal/nio/DoubleArrayBufferTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::DoubleArrayBufferTest );
-//#include <decaf/internal/nio/FloatArrayBufferTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::FloatArrayBufferTest );
-//#include <decaf/internal/nio/LongArrayBufferTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::LongArrayBufferTest );
-//#include <decaf/internal/nio/IntArrayBufferTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::IntArrayBufferTest );
-//#include <decaf/internal/nio/ShortArrayBufferTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ShortArrayBufferTest );
-//
-//#include <decaf/internal/net/URIEncoderDecoderTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIEncoderDecoderTest );
-//#include <decaf/internal/net/URIHelperTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIHelperTest );
-//
-//#include <decaf/nio/BufferTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::nio::BufferTest );
-//
-//#include <decaf/io/FilterInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest );
-//#include <decaf/io/FilterOutputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterOutputStreamTest );
-//#include <decaf/io/BufferedInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedInputStreamTest );
-//#include <decaf/io/BufferedOutputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedOutputStreamTest );
-//#include <decaf/io/ByteArrayInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayInputStreamTest );
-//#include <decaf/io/ByteArrayOutputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayOutputStreamTest );
-//#include <decaf/io/DataInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataInputStreamTest );
-//#include <decaf/io/DataOutputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataOutputStreamTest );
-//#include <decaf/io/WriterTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::WriterTest );
-//#include <decaf/io/ReaderTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ReaderTest );
-//#include <decaf/io/OutputStreamWriterTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamWriterTest );
-//#include <decaf/io/InputStreamReaderTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamReaderTest );
-//
-//#include <decaf/lang/MathTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::MathTest );
-//#include <decaf/lang/ByteTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ByteTest );
-//#include <decaf/lang/CharacterTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::CharacterTest );
-//#include <decaf/lang/BooleanTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest );
-//#include <decaf/lang/ShortTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ShortTest );
-//#include <decaf/lang/IntegerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest );
-//#include <decaf/lang/LongTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest );
-//#include <decaf/lang/FloatTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::FloatTest );
-//#include <decaf/lang/DoubleTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::DoubleTest );
-//#include <decaf/lang/ExceptionTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ExceptionTest );
-//#include <decaf/lang/ThreadTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ThreadTest );
-//#include <decaf/lang/SystemTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::SystemTest );
-//#include <decaf/lang/PointerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::PointerTest );
-//
-//#include <decaf/net/SocketFactoryTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest );
-//#include <decaf/net/SocketTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest );
-//#include <decaf/net/URITest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest );
-//#include <decaf/net/URISyntaxExceptionTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest );
-//#include <decaf/net/URLEncoderTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLEncoderTest );
-//#include <decaf/net/URLDecoderTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLDecoderTest );
-//
-//#include <decaf/util/concurrent/ConcurrentStlMapTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ConcurrentStlMapTest );
-//#include <decaf/util/concurrent/CountDownLatchTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CountDownLatchTest );
-//#include <decaf/util/concurrent/MutexTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::MutexTest );
-//#include <decaf/util/concurrent/ThreadPoolTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ThreadPoolTest );
-//#include <decaf/util/concurrent/TimeUnitTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::TimeUnitTest );
-//
-//#include <decaf/util/concurrent/atomic/AtomicBooleanTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicBooleanTest );
-//#include <decaf/util/concurrent/atomic/AtomicIntegerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicIntegerTest );
-//#include <decaf/util/concurrent/atomic/AtomicReferenceTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicReferenceTest );
-//
-//#include <decaf/util/concurrent/locks/LockSupportTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::LockSupportTest );
-//
-//#include <decaf/util/DateTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::DateTest );
-//#include <decaf/util/UUIDTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::UUIDTest );
-//#include <decaf/util/ListTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ListTest );
-//#include <decaf/util/StlMapTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StlMapTest );
-//#include <decaf/util/PropertiesTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PropertiesTest );
-//#include <decaf/util/QueueTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::QueueTest );
-//#include <decaf/util/RandomTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::RandomTest );
-//#include <decaf/util/SetTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::SetTest );
-//#include <decaf/util/StringTokenizerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest );
-//#include <decaf/util/TimerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::TimerTest );
-//#include <decaf/util/PriorityQueueTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PriorityQueueTest );
+#include <activemq/commands/BrokerInfoTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerInfoTest );
+#include <activemq/commands/BrokerIdTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerIdTest );
+#include <activemq/commands/ActiveMQTopicTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTopicTest );
+#include <activemq/commands/ActiveMQTextMessageTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTextMessageTest );
+#include <activemq/commands/ActiveMQTempTopicTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempTopicTest );
+#include <activemq/commands/ActiveMQTempQueueTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempQueueTest );
+#include <activemq/commands/ActiveMQQueueTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQQueueTest );
+#include <activemq/commands/ActiveMQMessageTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMessageTest );
+#include <activemq/commands/ActiveMQMapMessageTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMapMessageTest );
+#include <activemq/commands/ActiveMQDestinationTest2.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQDestinationTest );
+#include <activemq/commands/ActiveMQBytesMessageTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQBytesMessageTest );
+#include <activemq/commands/ActiveMQStreamMessageTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQStreamMessageTest );
+
+#include <activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::BaseDataStreamMarshallerTest );
+#include <activemq/wireformat/openwire/marshal/PrimitiveTypesMarshallerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::PrimitiveTypesMarshallerTest );
+
+#include <activemq/wireformat/openwire/utils/BooleanStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::BooleanStreamTest );
+#include <activemq/wireformat/openwire/utils/HexTableTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::HexTableTest );
+#include <activemq/wireformat/openwire/utils/OpenwireStringSupportTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::OpenwireStringSupportTest );
+#include <activemq/wireformat/openwire/utils/MessagePropertyInterceptorTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::MessagePropertyInterceptorTest );
+
+#include <activemq/wireformat/openwire/OpenWireFormatTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::OpenWireFormatTest );
+
+#include <activemq/cmsutil/CmsAccessorTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsAccessorTest );
+#include <activemq/cmsutil/CmsDestinationAccessorTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsDestinationAccessorTest );
+#include <activemq/cmsutil/CmsTemplateTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsTemplateTest );
+#include <activemq/cmsutil/DynamicDestinationResolverTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::DynamicDestinationResolverTest );
+#include <activemq/cmsutil/SessionPoolTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::SessionPoolTest );
+
+#include <activemq/core/ActiveMQConnectionFactoryTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionFactoryTest );
+#include <activemq/core/ActiveMQConnectionTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionTest );
+#include <activemq/core/ActiveMQSessionTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQSessionTest );
+#include <activemq/core/MessageDispatchChannelTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::MessageDispatchChannelTest );
+
+#include <activemq/state/ConnectionStateTrackerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTrackerTest );
+#include <activemq/state/ConnectionStateTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTest );
+#include <activemq/state/ConsumerStateTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConsumerStateTest );
+#include <activemq/state/ProducerStateTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ProducerStateTest );
+#include <activemq/state/SessionStateTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::SessionStateTest );
+#include <activemq/state/TransactionStateTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::TransactionStateTest );
+
+#include <activemq/transport/failover/FailoverTransportTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::failover::FailoverTransportTest );
+
+#include <activemq/transport/correlator/ResponseCorrelatorTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::correlator::ResponseCorrelatorTest );
+
+#include <activemq/transport/mock/MockTransportFactoryTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::mock::MockTransportFactoryTest );
+
+#include <activemq/transport/inactivity/InactivityMonitorTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::inactivity::InactivityMonitorTest );
+
+#include <activemq/transport/TransportRegistryTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::TransportRegistryTest );
+#include <activemq/transport/IOTransportTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::IOTransportTest );
+
+#include <activemq/exceptions/ActiveMQExceptionTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::exceptions::ActiveMQExceptionTest );
+
+#include <activemq/util/LongSequenceGeneratorTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::LongSequenceGeneratorTest );
+#include <activemq/util/PrimitiveValueNodeTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueNodeTest );
+#include <activemq/util/PrimitiveListTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveListTest );
+#include <activemq/util/PrimitiveMapTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapTest );
+#include <activemq/util/PrimitiveValueConverterTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueConverterTest );
+#include <activemq/util/URISupportTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::URISupportTest );
+#include <activemq/util/MemoryUsageTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MemoryUsageTest );
+
+#include <activemq/threads/DedicatedTaskRunnerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::DedicatedTaskRunnerTest );
+#include <activemq/threads/CompositeTaskRunnerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::CompositeTaskRunnerTest );
+
+#include <activemq/wireformat/WireFormatRegistryTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::WireFormatRegistryTest );
+
+#include <decaf/internal/util/ByteArrayAdapterTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::ByteArrayAdapterTest );
+#include <decaf/internal/util/TimerTaskHeapTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::TimerTaskHeapTest );
+
+#include <decaf/internal/nio/ByteArrayPerspectiveTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayPerspectiveTest );
+#include <decaf/internal/nio/ByteArrayBufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayBufferTest );
+#include <decaf/internal/nio/BufferFactoryTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::BufferFactoryTest );
+#include <decaf/internal/nio/CharArrayBufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::CharArrayBufferTest );
+#include <decaf/internal/nio/DoubleArrayBufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::DoubleArrayBufferTest );
+#include <decaf/internal/nio/FloatArrayBufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::FloatArrayBufferTest );
+#include <decaf/internal/nio/LongArrayBufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::LongArrayBufferTest );
+#include <decaf/internal/nio/IntArrayBufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::IntArrayBufferTest );
+#include <decaf/internal/nio/ShortArrayBufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ShortArrayBufferTest );
+
+#include <decaf/internal/net/URIEncoderDecoderTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIEncoderDecoderTest );
+#include <decaf/internal/net/URIHelperTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIHelperTest );
+
+#include <decaf/nio/BufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::nio::BufferTest );
+
+#include <decaf/io/FilterInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest );
+#include <decaf/io/FilterOutputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterOutputStreamTest );
+#include <decaf/io/BufferedInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedInputStreamTest );
+#include <decaf/io/BufferedOutputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedOutputStreamTest );
+#include <decaf/io/ByteArrayInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayInputStreamTest );
+#include <decaf/io/ByteArrayOutputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayOutputStreamTest );
+#include <decaf/io/DataInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataInputStreamTest );
+#include <decaf/io/DataOutputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataOutputStreamTest );
+#include <decaf/io/WriterTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::WriterTest );
+#include <decaf/io/ReaderTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ReaderTest );
+#include <decaf/io/OutputStreamWriterTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamWriterTest );
+#include <decaf/io/InputStreamReaderTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamReaderTest );
+
+#include <decaf/lang/MathTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::MathTest );
+#include <decaf/lang/ByteTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ByteTest );
+#include <decaf/lang/CharacterTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::CharacterTest );
+#include <decaf/lang/BooleanTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest );
+#include <decaf/lang/ShortTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ShortTest );
+#include <decaf/lang/IntegerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest );
+#include <decaf/lang/LongTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest );
+#include <decaf/lang/FloatTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::FloatTest );
+#include <decaf/lang/DoubleTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::DoubleTest );
+#include <decaf/lang/ExceptionTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ExceptionTest );
+#include <decaf/lang/ThreadTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ThreadTest );
+#include <decaf/lang/SystemTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::SystemTest );
+#include <decaf/lang/PointerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::PointerTest );
+
+#include <decaf/net/SocketFactoryTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest );
+#include <decaf/net/SocketTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest );
+#include <decaf/net/URITest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest );
+#include <decaf/net/URISyntaxExceptionTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest );
+#include <decaf/net/URLEncoderTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLEncoderTest );
+#include <decaf/net/URLDecoderTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLDecoderTest );
+
+#include <decaf/util/concurrent/ConcurrentStlMapTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ConcurrentStlMapTest );
+#include <decaf/util/concurrent/CountDownLatchTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CountDownLatchTest );
+#include <decaf/util/concurrent/MutexTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::MutexTest );
+#include <decaf/util/concurrent/ThreadPoolTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ThreadPoolTest );
+#include <decaf/util/concurrent/TimeUnitTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::TimeUnitTest );
+
+#include <decaf/util/concurrent/atomic/AtomicBooleanTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicBooleanTest );
+#include <decaf/util/concurrent/atomic/AtomicIntegerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicIntegerTest );
+#include <decaf/util/concurrent/atomic/AtomicReferenceTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicReferenceTest );
+
+#include <decaf/util/concurrent/locks/LockSupportTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::LockSupportTest );
+
+#include <decaf/util/DateTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::DateTest );
+#include <decaf/util/UUIDTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::UUIDTest );
+#include <decaf/util/ListTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ListTest );
+#include <decaf/util/StlMapTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StlMapTest );
+#include <decaf/util/PropertiesTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PropertiesTest );
+#include <decaf/util/QueueTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::QueueTest );
+#include <decaf/util/RandomTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::RandomTest );
+#include <decaf/util/SetTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::SetTest );
+#include <decaf/util/StringTokenizerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest );
+#include <decaf/util/TimerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::TimerTest );
+#include <decaf/util/PriorityQueueTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PriorityQueueTest );
 
 #include <decaf/util/zip/DeflaterTest.h>
 CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterTest );



Mime
View raw message