You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/03/21 18:30:58 UTC

svn commit: r925834 [3/3] - in /activemq/activemq-cpp/trunk/activemq-cpp/src: examples/ examples/topics/chat/ main/activemq/cmsutil/ main/activemq/commands/ main/activemq/core/ main/activemq/util/ main/activemq/wireformat/openwire/ main/activemq/wirefo...

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=925834&r1=925833&r2=925834&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 Sun Mar 21 17:30:56 2010
@@ -94,7 +94,7 @@ void OutputStreamWriterTest::testWriteCh
 
     CPPUNIT_ASSERT_EQUAL( std::string("es"), this->buffer1->toString() );
 
-    this->writer1->write( TEST_STRING.c_str(), 0, TEST_STRING.length() );
+    this->writer1->write( TEST_STRING.c_str(), 0, (int)TEST_STRING.length() );
     this->writer1->flush();
 
     CPPUNIT_ASSERT_EQUAL( std::string("es") + TEST_STRING, this->buffer1->toString() );
@@ -149,7 +149,7 @@ void OutputStreamWriterTest::testWriteSt
     this->writer1->flush();
     CPPUNIT_ASSERT_EQUAL( std::string( "bc" ), this->buffer1->toString() );
 
-    this->writer1->write( TEST_STRING, 0, TEST_STRING.length() );
+    this->writer1->write( TEST_STRING, 0, (int)TEST_STRING.length() );
     this->writer1->flush();
     CPPUNIT_ASSERT_EQUAL( std::string( "bc" ) + TEST_STRING, this->buffer1->toString() );
 
@@ -182,7 +182,7 @@ void OutputStreamWriterTest::testWriteSt
     this->writer1->flush();
     CPPUNIT_ASSERT_EQUAL( std::string( "abc" ), this->buffer1->toString() );
 
-    this->writer1->write( TEST_STRING, 0, TEST_STRING.length() );
+    this->writer1->write( TEST_STRING, 0, (int)TEST_STRING.length() );
     this->writer1->flush();
     CPPUNIT_ASSERT_EQUAL( std::string( "abc" ) + TEST_STRING, this->buffer1->toString() );
 

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=925834&r1=925833&r2=925834&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 Sun Mar 21 17:30:56 2010
@@ -50,7 +50,7 @@ namespace {
 
         MockReader( std::vector<char>& data ) : Reader() {
             this->contents = data;
-            this->length = contents.size();
+            this->length = (int)contents.size();
             this->current_offset = 0;
         }
 
@@ -73,7 +73,7 @@ namespace {
                 return -1;
             }
 
-            length = Math::min( (long long)length, (long long)( this->length - current_offset ) );
+            length = Math::min( length, this->length - current_offset );
             for( int i = 0; i < length; i++ ) {
                 buffer[offset + i] = contents[current_offset + i];
             }
@@ -217,7 +217,7 @@ void ReaderTest::testReset() {
 void ReaderTest::testSkip() {
     std::string s = "MY TEST STRING";
     std::vector<char> srcBuffer( s.begin(), s.end() );
-    int length = srcBuffer.size();
+    int length = (int)srcBuffer.size();
     MockReader mockReader( srcBuffer );
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Should be equal to \'M\'", (int)'M', mockReader.read() );
 

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=925834&r1=925833&r2=925834&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 Sun Mar 21 17:30:56 2010
@@ -149,7 +149,7 @@ void WriterTest::testWriteStringOffsetCo
     std::string testString = "My Test String";
     MockWriter writer( 20 );
 
-    writer.write( testString, 0, testString.length() );
+    writer.write( testString, 0, (int)testString.length() );
 
     std::vector<char> result = writer.getContents();
     CPPUNIT_ASSERT_EQUAL( testString, std::string( result.begin(), result.end() ) );
@@ -174,7 +174,7 @@ void WriterTest::testAppendCharSequence(
     std::string testString = "My Test String";
     MockWriter writer( 20 );
 
-    CharBuffer* buffer = CharBuffer::allocate( testString.size() );
+    CharBuffer* buffer = CharBuffer::allocate( (int)testString.size() );
     buffer->put( testString );
     buffer->rewind();
 
@@ -194,7 +194,7 @@ void WriterTest::testAppendCharSequenceI
     std::string testString = "My Test String";
     MockWriter writer(20);
 
-    CharBuffer* buffer = CharBuffer::allocate( testString.size() );
+    CharBuffer* buffer = CharBuffer::allocate( (int)testString.size() );
     buffer->put( testString );
     buffer->rewind();
 

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=925834&r1=925833&r2=925834&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 Sun Mar 21 17:30:56 2010
@@ -106,7 +106,7 @@ namespace net{
 
                             if( strcmp( (char*)buf, "reply" ) == 0 ){
                                 io::OutputStream* output = socket->getOutputStream();
-                                output->write( (unsigned char*)"hello", strlen("hello"), 0, strlen("hello") );
+                                output->write( (unsigned char*)"hello", (int)strlen("hello"), 0, (int)strlen("hello") );
                             }
 
                         }catch( io::IOException& ex ){

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=925834&r1=925833&r2=925834&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 Sun Mar 21 17:30:56 2010
@@ -98,7 +98,7 @@ void SocketTest::testTx() {
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "don't reply";
-        stream->write( (unsigned char*)msg.c_str(), msg.length(), 0, msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), (int)msg.length(), 0, (int)msg.length() );
 
         Thread::sleep( 10 );
 
@@ -152,7 +152,7 @@ void SocketTest::testTrx() {
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "reply";
-        stream->write( (unsigned char*)msg.c_str(), msg.length(), 0, msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), (int)msg.length(), 0, (int)msg.length() );
 
         synchronized(&serverThread.mutex)
         {
@@ -256,7 +256,7 @@ void SocketTest::testTrxNoDelay() {
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "reply";
-        stream->write( (unsigned char*)msg.c_str(), msg.length(), 0, msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), (int)msg.length() );
 
         synchronized(&serverThread.mutex)
         {

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=925834&r1=925833&r2=925834&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 Sun Mar 21 17:30:56 2010
@@ -114,7 +114,7 @@ namespace net{
 
                             if( strcmp( (char*)buf, "reply" ) == 0 ){
                                 io::OutputStream* output = socket->getOutputStream();
-                                output->write( (unsigned char*)"hello", strlen("hello"), 0, strlen("hello") );
+                                output->write( (unsigned char*)"hello", (int)strlen("hello"), 0, (int)strlen("hello") );
 
                                   synchronized(&mutex) {
                                      mutex.notifyAll();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/Endian.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/Endian.cpp?rev=925834&r1=925833&r2=925834&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/Endian.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/Endian.cpp Sun Mar 21 17:30:56 2010
@@ -53,8 +53,8 @@ unsigned short Endian::byteSwap( unsigne
         return value;
     #endif
 
-    return (((unsigned short)value & 0xFF00 ) >> 8 ) |
-           (((unsigned short)value & 0x00FF ) << 8 );
+    return (unsigned short)((value & 0xFF00 ) >> 8 ) |
+           (unsigned short)((value & 0x00FF ) << 8 );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/Adler32Test.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/Adler32Test.cpp?rev=925834&r1=925833&r2=925834&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/Adler32Test.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/Adler32Test.cpp Sun Mar 21 17:30:56 2010
@@ -132,18 +132,18 @@ void Adler32Test::testUpdateArray() {
 ////////////////////////////////////////////////////////////////////////////////
 void Adler32Test::testUpdateArrayIndexed() {
 
-    static const std::size_t SIZE = 3;
+    static const int SIZE = 3;
     unsigned char byteArray[] = { 1, 2, 3 };
 
     Adler32 adl;
-    std::size_t off = 2;// accessing the 2nd element of byteArray
-    std::size_t len = 1;
-    std::size_t lenError = 3;
-    std::size_t offError = 4;
+    int off = 2;// accessing the 2nd element of byteArray
+    int len = 1;
+    int lenError = 3;
+    int offError = 4;
     adl.update( byteArray, SIZE, off, len );
 
     // The value of the adl should be 262148
-    CPPUNIT_ASSERT_EQUAL_MESSAGE( "update(unsigned char[],std::size_t,std::size_t) failed to update the checksum to the correct value ",
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "update(unsigned char[],int,int) failed to update the checksum to the correct value ",
                                   262148LL, adl.getValue() );
 
     CPPUNIT_ASSERT_THROW_MESSAGE(

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CRC32Test.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CRC32Test.cpp?rev=925834&r1=925833&r2=925834&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CRC32Test.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CRC32Test.cpp Sun Mar 21 17:30:56 2010
@@ -150,19 +150,19 @@ void CRC32Test::testUpdateArray() {
 ////////////////////////////////////////////////////////////////////////////////
 void CRC32Test::testUpdateArrayIndexed() {
 
-    static const std::size_t SIZE = 3;
+    static const int SIZE = 3;
     unsigned char byteArray[] = {1, 2, 3};
     CRC32 crc;
 
-    std::size_t off = 2;// accessing the 2nd element of byteArray
-    std::size_t len = 1;
-    std::size_t lenError = 3;
-    std::size_t offError = 4;
+    int off = 2;// accessing the 2nd element of byteArray
+    int len = 1;
+    int lenError = 3;
+    int offError = 4;
     crc.update( byteArray, SIZE, off, len );
 
     // Ran JDK and discovered that the value of the CRC should be
     // 1259060791
-    CPPUNIT_ASSERT_EQUAL_MESSAGE( "update(unsigned char[],std::size_t,std::size_t) failed to update the checksum to the correct value ",
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "update(unsigned char[],int,int) failed to update the checksum to the correct value ",
                                   1259060791LL, crc.getValue() );
 
     CPPUNIT_ASSERT_THROW_MESSAGE(

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp?rev=925834&r1=925833&r2=925834&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp Sun Mar 21 17:30:56 2010
@@ -67,7 +67,7 @@ void CheckedInputStreamTest::testGetChec
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "the checkSum value of an empty file is not zero",
                                   0LL, checkEmpty.getChecksum()->getValue() );
 
-    static const std::size_t SIZE = 10;
+    static const int SIZE = 10;
     unsigned char byteArray[] = { 1, 3, 4, 7, 8, 'e', 'r', 't', 'y', '5' };
 
     std::vector<unsigned char> outPutBuf( 500 );
@@ -92,10 +92,10 @@ void CheckedInputStreamTest::testGetChec
 ////////////////////////////////////////////////////////////////////////////////
 void CheckedInputStreamTest::testSkip() {
 
-    static const std::size_t SIZE = 256;
+    static const int SIZE = 256;
     std::vector<unsigned char> byteArray( SIZE );
-    for( std::size_t i = 0; i < SIZE; ++i ) {
-        byteArray[i] = i;
+    for( int i = 0; i < SIZE; ++i ) {
+        byteArray[i] = (unsigned char)i;
     }
     std::vector<unsigned char> outPutBuf( 500 );
 
@@ -121,10 +121,10 @@ void CheckedInputStreamTest::testSkip() 
 ////////////////////////////////////////////////////////////////////////////////
 void CheckedInputStreamTest::testRead() {
 
-    static const std::size_t SIZE = 256;
+    static const int SIZE = 256;
     std::vector<unsigned char> byteArray( SIZE );
-    for( std::size_t i = 0; i < SIZE; ++i ) {
-        byteArray[i] = i;
+    for( int i = 0; i < SIZE; ++i ) {
+        byteArray[i] = (unsigned char)i;
     }
     std::vector<unsigned char> outPutBuf( 500 );
 
@@ -151,10 +151,10 @@ void CheckedInputStreamTest::testRead() 
 ////////////////////////////////////////////////////////////////////////////////
 void CheckedInputStreamTest::testReadBIII() {
 
-    static const std::size_t SIZE = 256;
+    static const int SIZE = 256;
     std::vector<unsigned char> byteArray( SIZE );
-    for( std::size_t i = 0; i < SIZE; ++i ) {
-        byteArray[i] = i;
+    for( int i = 0; i < SIZE; ++i ) {
+        byteArray[i] = (unsigned char)i;
     }
     std::vector<unsigned char> outPutBuf( 500 );
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp?rev=925834&r1=925833&r2=925834&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterOutputStreamTest.cpp Sun Mar 21 17:30:56 2010
@@ -114,13 +114,13 @@ void DeflaterOutputStreamTest::setUp() {
     deflate.setInput( byteArray, 5, 0, 5 );
 
     while( !( deflate.needsInput() ) ) {
-        x += deflate.deflate( outputBuffer, x, outputBuffer.size() - x );
+        x += deflate.deflate( outputBuffer, x, (int)outputBuffer.size() - x );
     }
 
     deflate.finish();
 
     while( !( deflate.finished() ) ) {
-        x = x + deflate.deflate( outputBuffer, x, outputBuffer.size() - x );
+        x = x + deflate.deflate( outputBuffer, x, (int)outputBuffer.size() - x );
     }
 
     deflate.end();
@@ -160,7 +160,7 @@ void DeflaterOutputStreamTest::testConst
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Incorrect Buffer Size",
                                   (std::size_t)512, dos.getProtectedBuf().size() );
 
-    dos.write( &outputBuffer[0], outputBuffer.size() );
+    dos.write( &outputBuffer[0], (int)outputBuffer.size() );
     dos.close();
 }
 
@@ -251,7 +251,7 @@ void DeflaterOutputStreamTest::testWrite
     DeflaterOutputStream dos( &baos );
 
     for( int i = 0; i < 3; i++ ) {
-        dos.write( i );
+        dos.write( (unsigned char)i );
     }
     dos.close();
 
@@ -312,7 +312,7 @@ void DeflaterOutputStreamTest::testDefla
     MyDeflaterOutputStream dos( &baos );
     CPPUNIT_ASSERT( !dos.getDaflateFlag() );
     for( int i = 0; i < 3; i++ ) {
-        dos.write( i );
+        dos.write( (unsigned char)i );
     }
     CPPUNIT_ASSERT( dos.getDaflateFlag() );
     dos.close();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp?rev=925834&r1=925833&r2=925834&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp Sun Mar 21 17:30:56 2010
@@ -61,7 +61,7 @@ void DeflaterTest::testDeflateVector() {
     std::vector<unsigned char> outPutBuf( 50 );
     std::vector<unsigned char> outPutInf( 50 );
 
-    std::size_t x = 0;
+    int x = 0;
 
     Deflater defl;
     defl.setInput( byteArray, 5, 0, 5 );
@@ -108,8 +108,8 @@ void DeflaterTest::testDeflateVector() {
 ////////////////////////////////////////////////////////////////////////////////
 void DeflaterTest::testDeflateArray() {
 
-    static const std::size_t BUFFER_SIZE = 50;
-    static const std::size_t INPUT_SIZE = 5;
+    static const int BUFFER_SIZE = 50;
+    static const int INPUT_SIZE = 5;
 
     unsigned char outPutBuf[BUFFER_SIZE];
     memset( outPutBuf, 0, BUFFER_SIZE );
@@ -117,9 +117,9 @@ void DeflaterTest::testDeflateArray() {
     unsigned char outPutInf[BUFFER_SIZE];
     memset( outPutInf, 0, BUFFER_SIZE );
 
-    std::size_t offSet = 1;
-    std::size_t length = BUFFER_SIZE - 1;
-    std::size_t x = 0;
+    int offSet = 1;
+    int length = BUFFER_SIZE - 1;
+    int x = 0;
 
     Deflater defl;
 
@@ -135,8 +135,8 @@ void DeflaterTest::testDeflateArray() {
 
     long long totalOut = defl.getBytesWritten();
     long long totalIn = defl.getBytesRead();
-    CPPUNIT_ASSERT_EQUAL( x, (std::size_t)totalOut );
-    CPPUNIT_ASSERT_EQUAL( INPUT_SIZE, (std::size_t)totalIn );
+    CPPUNIT_ASSERT_EQUAL( x, (int)totalOut );
+    CPPUNIT_ASSERT_EQUAL( INPUT_SIZE, (int)totalIn );
     defl.end();
 
     Inflater infl;
@@ -151,7 +151,7 @@ void DeflaterTest::testDeflateArray() {
 
     CPPUNIT_ASSERT_EQUAL( totalIn, infl.getBytesWritten() );
     CPPUNIT_ASSERT_EQUAL( totalOut, infl.getBytesRead() );
-    for( std::size_t i = 0; i < INPUT_SIZE; i++ ) {
+    for( int i = 0; i < INPUT_SIZE; i++ ) {
         CPPUNIT_ASSERT_EQUAL( byteArray[i], outPutInf[i] );
     }
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Final decompressed data contained more bytes than original",
@@ -211,7 +211,7 @@ void DeflaterTest::testFinish() {
     std::vector<unsigned char> outPutBuf(100);
     std::vector<unsigned char> outPutInf(100);
 
-    std::size_t x = 0;
+    int x = 0;
     Deflater defl;
     defl.setInput( byteArray, 5, 0, 5 );
     defl.finish();
@@ -325,11 +325,11 @@ void DeflaterTest::testReset() {
     unsigned char byteArray[] = { 1, 3, 4, 7, 8 };
     unsigned char byteArray2[] = { 8, 7, 4, 3, 1 };
 
-    std::size_t x = 0;
-    std::size_t orgValue = 0;
+    int x = 0;
+    int orgValue = 0;
     Deflater defl;
 
-    for( std::size_t i = 0; i < 3; i++ ) {
+    for( int i = 0; i < 3; i++ ) {
 
         if( i == 0 ) {
             memcpy( curArray, byteArray, 5 );
@@ -346,7 +346,7 @@ void DeflaterTest::testReset() {
         }
 
         if( i == 0 ) {
-            CPPUNIT_ASSERT_EQUAL( x, (std::size_t)defl.getBytesWritten() );
+            CPPUNIT_ASSERT_EQUAL( x, (int)defl.getBytesWritten() );
         } else if( i == 1 ) {
             CPPUNIT_ASSERT_EQUAL( x, orgValue );
         } else {
@@ -373,7 +373,7 @@ void DeflaterTest::testReset() {
             memcpy( curArray, byteArray, 5 );
         }
 
-        for( std::size_t j = 0; j < 5; j++ ) {
+        for( int j = 0; j < 5; j++ ) {
             CPPUNIT_ASSERT_EQUAL( curArray[j], outPutInf[j] );
         }
 
@@ -441,8 +441,8 @@ void DeflaterTest::testSetDictionaryBIII
                                   '3', 'w', 'r', 't', 'u', 'i', 'o', 4, 5, 6, 7 };
     std::vector<unsigned char> outPutBuf( 100 );
 
-    std::size_t offSet = 4;
-    std::size_t length = 5;
+    int offSet = 4;
+    int length = 5;
 
     Deflater defl;
     long long deflAdler = defl.getAdler();
@@ -473,7 +473,7 @@ void DeflaterTest::testSetDictionaryBIII
 
     // boundary check
     Deflater defl2;
-    for( std::size_t i = 0; i < 2; i++ ) {
+    for( int i = 0; i < 2; i++ ) {
 
         if( i == 0 ) {
             offSet = 0;
@@ -528,10 +528,10 @@ void DeflaterTest::testSetInputVector() 
         CPPUNIT_FAIL("Invalid input to be decompressed");
     }
 
-    for( std::size_t i = 0; i < byteVector.size(); i++ ) {
+    for( int i = 0; i < (int)byteVector.size(); i++ ) {
         CPPUNIT_ASSERT_EQUAL( byteVector[i], outPutInf[i] );
     }
-    CPPUNIT_ASSERT_EQUAL( byteVector.size(), (std::size_t)infl.getBytesWritten() );
+    CPPUNIT_ASSERT_EQUAL( (long long)byteVector.size(), infl.getBytesWritten() );
     infl.end();
 }
 
@@ -544,8 +544,8 @@ void DeflaterTest::testSetInputBIII() {
     std::vector<unsigned char> outPutBuf( 50 );
     std::vector<unsigned char> outPutInf( 50 );
 
-    std::size_t offSet = 1;
-    std::size_t length = 3;
+    int offSet = 1;
+    int length = 3;
 
     Deflater defl;
     defl.setInput( byteArray, SIZE, offSet, length);
@@ -568,15 +568,15 @@ void DeflaterTest::testSetInputBIII() {
         infl.inflate( outPutInf );
     }
 
-    for( std::size_t i = 0; i < length; i++ ) {
+    for( int i = 0; i < length; i++ ) {
         CPPUNIT_ASSERT_EQUAL( byteArray[i + offSet], outPutInf[i] );
     }
-    CPPUNIT_ASSERT_EQUAL( length, (std::size_t)infl.getBytesWritten() );
+    CPPUNIT_ASSERT_EQUAL( length, (int)infl.getBytesWritten() );
     infl.end();
 
     // boundary check
     Deflater defl2;
-    for( std::size_t i = 0; i < 2; i++ ) {
+    for( int i = 0; i < 2; i++ ) {
 
         if( i == 0 ) {
             offSet = 0;
@@ -601,14 +601,14 @@ void DeflaterTest::testSetInputBIII() {
 void DeflaterTest::testSetLevel() {
 
     std::vector<unsigned char> byteArray( 100 );
-    for( std::size_t ix = 0; ix < 100; ++ix ) {
-        byteArray[ix] = ix + 1;
+    for( int ix = 0; ix < 100; ++ix ) {
+        byteArray[ix] = (unsigned char)( ix + 1 );
     }
 
     std::vector<unsigned char> outPutBuf( 500 );
 
     long long totalOut;
-    for( std::size_t i = 0; i < 10; i++ ) {
+    for( int i = 0; i < 10; i++ ) {
 
         {
             Deflater defl;
@@ -659,11 +659,11 @@ void DeflaterTest::testSetLevel() {
 void DeflaterTest::testSetStrategy() {
 
     std::vector<unsigned char> byteArray( 100 );
-    for( std::size_t ix = 0; ix < 100; ++ix ) {
-        byteArray[ix] = ix + 1;
+    for( int ix = 0; ix < 100; ++ix ) {
+        byteArray[ix] = (unsigned char)( ix + 1 );
     }
 
-    for( std::size_t i = 0; i < 3; i++ ) {
+    for( int i = 0; i < 3; i++ ) {
 
         std::vector<unsigned char> outPutBuf( 500 );
         Deflater mdefl;
@@ -712,8 +712,8 @@ void DeflaterTest::testSetStrategy() {
 void DeflaterTest::testConstructor() {
 
     std::vector<unsigned char> byteArray( 100 );
-    for( std::size_t ix = 0; ix < 100; ++ix ) {
-        byteArray[ix] = ix + 1;
+    for( int ix = 0; ix < 100; ++ix ) {
+        byteArray[ix] = (unsigned char)( ix + 1 );
     }
 
     Deflater defl;
@@ -747,7 +747,7 @@ void DeflaterTest::testConstructor() {
 ////////////////////////////////////////////////////////////////////////////////
 void DeflaterTest::testConstructorIB() {
 
-    static const std::size_t ARRAY_SIZE = 15;
+    static const int ARRAY_SIZE = 15;
 
     unsigned char byteArray[] = { 4, 5, 3, 2, 'a', 'b', 6, 7, 8, 9, 0, 's', '3', 'w', 'r' };
 
@@ -804,7 +804,7 @@ void DeflaterTest::testConstructorIB() {
         }
         infl.inflate( outPutInf );
     }
-    for( std::size_t i = 0; i < ARRAY_SIZE; i++ ) {
+    for( int i = 0; i < ARRAY_SIZE; i++ ) {
         CPPUNIT_ASSERT_EQUAL( byteArray[i], outPutInf[i] );
     }
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "final decompressed data contained more bytes than original - constructorIZ",
@@ -814,7 +814,7 @@ void DeflaterTest::testConstructorIB() {
     {
         Inflater infl( false );
         outPutBuf.assign( outPutBuf.size(), 0 );
-        std::size_t r = 0;
+        int r = 0;
         try {
             while( !infl.finished() ) {
                 if( infl.needsInput() ) {
@@ -846,8 +846,8 @@ void DeflaterTest::testConstructorIB() {
 void DeflaterTest::testConstructorI() {
 
     std::vector<unsigned char> byteArray( 100 );
-    for( std::size_t ix = 0; ix < 100; ++ix ) {
-        byteArray[ix] = ix + 1;
+    for( int ix = 0; ix < 100; ++ix ) {
+        byteArray[ix] = (unsigned char)( ix + 1 );
     }
 
     std::vector<unsigned char> outPutBuf( 500 );
@@ -977,7 +977,7 @@ void DeflaterTest::testGetBytesRead() {
     // Compress the bytes
     std::vector<unsigned char> output( 100 );
 
-    def.setInput( (unsigned char*)inputString.c_str(), inputString.size(), 0, inputString.size() );
+    def.setInput( (unsigned char*)inputString.c_str(), (int)inputString.size(), 0, (int)inputString.size() );
     def.finish();
 
     long long compressedDataLength = (long long)def.deflate( output );
@@ -999,7 +999,7 @@ void DeflaterTest::testGetBytesWritten()
     // Compress the bytes
     std::vector<unsigned char> output( 100 );
 
-    def.setInput( (unsigned char*)inputString.c_str(), inputString.size(), 0, inputString.size() );
+    def.setInput( (unsigned char*)inputString.c_str(), (int)inputString.size(), 0, (int)inputString.size() );
     def.finish();
 
     long long compressedDataLength = (long long)def.deflate( output );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp?rev=925834&r1=925833&r2=925834&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp Sun Mar 21 17:30:56 2010
@@ -122,12 +122,12 @@ void InflaterInputStreamTest::setUp() {
 
     Deflater deflater;
 
-    deflater.setInput( (const unsigned char*)testString.c_str(), testString.size(), 0, testString.size() );
+    deflater.setInput( (const unsigned char*)testString.c_str(), (int)testString.size(), 0, (int)testString.size() );
     deflater.finish();
 
     int x = 0;
     while( !deflater.finished() ) {
-        x += deflater.deflate( deflatedData, x, deflatedData.size() - x );
+        x += deflater.deflate( deflatedData, x, (int)deflatedData.size() - x );
     }
 
     this->deflatedData.resize( x + 1 );
@@ -372,7 +372,7 @@ void InflaterInputStreamTest::testSkip2(
     int i = 0;
     int result = 0;
     while( ( result = iis2.read() ) != -1 ) {
-        buffer[i] = result;
+        buffer[i] = (unsigned char)result;
         i++;
     }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp?rev=925834&r1=925833&r2=925834&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp Sun Mar 21 17:30:56 2010
@@ -205,19 +205,19 @@ void InflaterTest::testInflateVector() {
     outPutBuf.resize( 500 );
     outPutInf.assign( outPutInf.size(), 0 );
     std::vector<unsigned char> emptyArray( 11, 0 );
-    std::size_t x = 0;
+    int x = 0;
     Deflater defEmpty( 3 );
     defEmpty.setInput( emptyArray );
     while( !( defEmpty.needsInput() ) ) {
-        x += defEmpty.deflate( outPutBuf, x, outPutBuf.size() - x );
+        x += defEmpty.deflate( outPutBuf, x, (int)outPutBuf.size() - x );
     }
     defEmpty.finish();
     while( !( defEmpty.finished() ) ) {
-        x += defEmpty.deflate( outPutBuf, x, outPutBuf.size() - x );
+        x += defEmpty.deflate( outPutBuf, x, (int)outPutBuf.size() - x );
     }
     CPPUNIT_ASSERT_MESSAGE( "the total number of unsigned char from deflate did not equal "
                             "getTotalOut - inflate(unsigned char)",
-                            x == (std::size_t)defEmpty.getBytesWritten() );
+                            (long long)x == defEmpty.getBytesWritten() );
     CPPUNIT_ASSERT_MESSAGE(
                 "the number of input unsigned char from the array did not correspond with getTotalIn - inflate(unsigned char)",
                 (std::size_t)defEmpty.getBytesRead() == emptyArray.size() );
@@ -297,14 +297,14 @@ void InflaterTest::testInflateBII() {
 
     std::vector<unsigned char> outPutBuf( byteArray, byteArray + SIZE );
     std::vector<unsigned char> outPutInf( 100 );
-    std::size_t y = 0;
+    int y = 0;
     Inflater inflate;
     try {
         while( !( inflate.finished() ) ) {
             if( inflate.needsInput() ) {
                 inflate.setInput( outPutBuf );
             }
-            y += inflate.inflate( outPutInf, y, outPutInf.size() - y );
+            y += inflate.inflate( outPutInf, y, (int)outPutInf.size() - y );
         }
     } catch( DataFormatException& e ) {
         CPPUNIT_FAIL("Invalid input to be decompressed");
@@ -320,8 +320,8 @@ void InflaterTest::testInflateBII() {
     // test boundary checks
     inflate.reset();
     int r = 0;
-    std::size_t offSet = 0;
-    std::size_t lengthError = 101;
+    int offSet = 0;
+    int lengthError = 101;
     try {
         if( inflate.needsInput() ) {
             inflate.setInput( outPutBuf );
@@ -401,9 +401,9 @@ void InflaterTest::testConstructorZ() {
     deflater.setInput( byteArray, SIZE, 0, SIZE );
     deflater.finish();
 
-    std::size_t read = 0;
+    int read = 0;
     while( !deflater.finished() ) {
-        read = deflater.deflate( outPutBuf, read, outPutBuf.size() - read );
+        read = deflater.deflate( outPutBuf, read, (int)outPutBuf.size() - read );
     }
     deflater.end();
 
@@ -549,14 +549,14 @@ void InflaterTest::testReset() {
     deflater.setInput( byteArray, SIZE, 0, SIZE );
     deflater.finish();
 
-    std::size_t read = 0;
+    int read = 0;
     while( !deflater.finished() ) {
-        read = deflater.deflate( outPutBuf, read, outPutBuf.size() - read );
+        read = deflater.deflate( outPutBuf, read, (int)outPutBuf.size() - read );
     }
     deflater.end();
 
     std::vector<unsigned char> outPutInf( 100 );
-    std::size_t y = 0;
+    int y = 0;
     Inflater inflate;
     try {
 
@@ -564,7 +564,7 @@ void InflaterTest::testReset() {
             if( inflate.needsInput() ) {
                 inflate.setInput( outPutBuf );
             }
-            y += inflate.inflate( outPutInf, y, outPutInf.size() - y );
+            y += inflate.inflate( outPutInf, y, (int)outPutInf.size() - y );
         }
 
     } catch( DataFormatException& e ) {