activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r922426 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/ main/activemq/commands/ main/activemq/util/ main/activemq/wireformat/openwire/marshal/ main/activemq/wireformat/openwire/utils/ test-benchmarks/ test-benchmarks/activemq/wire...
Date Fri, 12 Mar 2010 21:02:26 GMT
Author: tabish
Date: Fri Mar 12 21:02:25 2010
New Revision: 922426

URL: http://svn.apache.org/viewvc?rev=922426&view=rev
Log:
Fix for: https://issues.apache.org/activemq/browse/AMQCPP-261

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.h   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.h   (with props)
Removed:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/utils/OpenwireStringSupport.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/utils/OpenwireStringSupport.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/wireformat/
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/utils/OpenwireStringSupportTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/utils/OpenwireStringSupportTest.h
Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/Makefile.am
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/testRegistry.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am?rev=922426&r1=922425&r2=922426&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am Fri Mar 12 21:02:25 2010
@@ -133,6 +133,7 @@ cc_sources = \
     activemq/util/CMSExceptionSupport.cpp \
     activemq/util/CompositeData.cpp \
     activemq/util/LongSequenceGenerator.cpp \
+    activemq/util/MarshallingSupport.cpp \
     activemq/util/MemoryUsage.cpp \
     activemq/util/PrimitiveList.cpp \
     activemq/util/PrimitiveMap.cpp \
@@ -459,7 +460,6 @@ cc_sources = \
     activemq/wireformat/openwire/utils/BooleanStream.cpp \
     activemq/wireformat/openwire/utils/HexTable.cpp \
     activemq/wireformat/openwire/utils/MessagePropertyInterceptor.cpp \
-    activemq/wireformat/openwire/utils/OpenwireStringSupport.cpp \
     activemq/wireformat/stomp/StompCommandConstants.cpp \
     activemq/wireformat/stomp/StompFrame.cpp \
     activemq/wireformat/stomp/StompHelper.cpp \
@@ -750,6 +750,7 @@ h_sources = \
     activemq/util/CompositeData.h \
     activemq/util/Config.h \
     activemq/util/LongSequenceGenerator.h \
+    activemq/util/MarshallingSupport.h \
     activemq/util/MemoryUsage.h \
     activemq/util/PrimitiveList.h \
     activemq/util/PrimitiveMap.h \
@@ -1082,7 +1083,6 @@ h_sources = \
     activemq/wireformat/openwire/utils/BooleanStream.h \
     activemq/wireformat/openwire/utils/HexTable.h \
     activemq/wireformat/openwire/utils/MessagePropertyInterceptor.h \
-    activemq/wireformat/openwire/utils/OpenwireStringSupport.h \
     activemq/wireformat/stomp/StompCommandConstants.h \
     activemq/wireformat/stomp/StompFrame.h \
     activemq/wireformat/stomp/StompHelper.h \
@@ -1322,6 +1322,7 @@ h_sources = \
     decaf/util/concurrent/TimeoutException.h \
     decaf/util/concurrent/atomic/AtomicBoolean.h \
     decaf/util/concurrent/atomic/AtomicInteger.h \
+    decaf/util/concurrent/atomic/AtomicRefCounter.h \
     decaf/util/concurrent/atomic/AtomicReference.h \
     decaf/util/concurrent/locks/Condition.h \
     decaf/util/concurrent/locks/Lock.h \

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp?rev=922426&r1=922425&r2=922426&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp Fri Mar 12 21:02:25 2010
@@ -15,9 +15,9 @@
  * limitations under the License.
  */
 #include <activemq/commands/ActiveMQStreamMessage.h>
-#include <activemq/wireformat/openwire/utils/OpenwireStringSupport.h>
 #include <activemq/util/PrimitiveValueNode.h>
 #include <activemq/util/CMSExceptionSupport.h>
+#include <activemq/util/MarshallingSupport.h>
 
 #include <cms/MessageEOFException.h>
 #include <cms/MessageFormatException.h>
@@ -49,7 +49,6 @@ using namespace activemq::commands;
 using namespace activemq::exceptions;
 using namespace activemq::wireformat;
 using namespace activemq::wireformat::openwire;
-using namespace activemq::wireformat::openwire::utils;
 using namespace decaf;
 using namespace decaf::io;
 using namespace decaf::lang;
@@ -828,10 +827,10 @@ std::string ActiveMQStreamMessage::readS
             return "";
         }
         if( type == PrimitiveValueNode::BIG_STRING_TYPE ) {
-            return OpenwireStringSupport::readString( *dataIn );
+            return MarshallingSupport::readString32( *this->dataIn );
         }
         if( type == PrimitiveValueNode::STRING_TYPE ) {
-            return this->dataIn->readUTF();
+            return MarshallingSupport::readString16( *this->dataIn );
         }
         if( type == PrimitiveValueNode::LONG_TYPE ) {
             return Long( this->dataIn->readLong() ).toString();
@@ -887,13 +886,7 @@ void ActiveMQStreamMessage::writeString(
 
     initializeWriting();
     try{
-        if( value.size() <= Short::MAX_VALUE / 4 ) {
-            this->dataOut->write( PrimitiveValueNode::STRING_TYPE );
-            this->dataOut->writeUTF( value );
-        } else {
-            this->dataOut->write( PrimitiveValueNode::BIG_STRING_TYPE );
-            OpenwireStringSupport::writeString( *(this->dataOut), &value );
-        }
+        MarshallingSupport::writeString( *this->dataOut, value );
     }
     AMQ_CATCH_ALL_THROW_CMSEXCEPTION()
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp?rev=922426&r1=922425&r2=922426&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp Fri Mar 12 21:02:25 2010
@@ -23,7 +23,7 @@
 #include <decaf/util/zip/DeflaterOutputStream.h>
 #include <decaf/util/zip/InflaterInputStream.h>
 
-#include <activemq/wireformat/openwire/utils/OpenwireStringSupport.h>
+#include <activemq/util/MarshallingSupport.h>
 #include <activemq/util/CMSExceptionSupport.h>
 #include <cms/CMSException.h>
 
@@ -34,7 +34,6 @@ using namespace activemq::commands;
 using namespace activemq::util;
 using namespace activemq::wireformat;
 using namespace activemq::wireformat::openwire;
-using namespace activemq::wireformat::openwire::utils;
 using namespace decaf::io;
 using namespace decaf::lang;
 using namespace decaf::util;
@@ -131,7 +130,11 @@ void ActiveMQTextMessage::beforeMarshal(
 
         DataOutputStream dataOut( os, true );
 
-        OpenwireStringSupport::writeString( dataOut, this->text.get() );
+        if( this->text.get() == NULL ) {
+            dataOut.writeInt( -1 );
+        } else {
+            MarshallingSupport::writeString32( dataOut, *( this->text ) );
+        }
 
         dataOut.close();
 
@@ -178,7 +181,7 @@ std::string ActiveMQTextMessage::getText
 
                 DataInputStream dataIn( is, true );
 
-                this->text.reset( new std::string( OpenwireStringSupport::readString( dataIn ) ) );
+                this->text.reset( new std::string( MarshallingSupport::readString32( dataIn ) ) );
 
                 dataIn.close();
 

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp?rev=922426&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp Fri Mar 12 21:02:25 2010
@@ -0,0 +1,282 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "MarshallingSupport.h"
+
+#include <activemq/util/PrimitiveValueNode.h>
+#include <activemq/exceptions/ExceptionDefines.h>
+#include <decaf/lang/Short.h>
+#include <decaf/lang/Integer.h>
+
+using namespace activemq;
+using namespace activemq::util;
+using namespace decaf;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace std;
+
+////////////////////////////////////////////////////////////////////////////////
+MarshallingSupport::MarshallingSupport() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+MarshallingSupport::~MarshallingSupport() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupport::writeString( decaf::io::DataOutputStream& dataOut, const std::string& value )
+    throw( decaf::io::IOException ) {
+
+    try{
+
+        if( value.length() <= Short::MAX_VALUE / 4 ) {
+            dataOut.write( PrimitiveValueNode::STRING_TYPE );
+            MarshallingSupport::writeString16( dataOut, value );
+        } else {
+            dataOut.write( PrimitiveValueNode::BIG_STRING_TYPE );
+            MarshallingSupport::writeString32( dataOut, value );
+        }
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupport::writeString16( decaf::io::DataOutputStream& dataOut, const std::string& value )
+    throw( decaf::io::IOException ) {
+
+    try{
+
+        std::size_t strSize = value.length();
+        dataOut.writeShort( (short)strSize );
+        if( strSize > 0 ) {
+            dataOut.write( (unsigned char*)value.c_str(), strSize, 0, strSize );
+        }
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupport::writeString32( decaf::io::DataOutputStream& dataOut, const std::string& value )
+    throw( decaf::io::IOException ) {
+
+    try{
+        std::size_t strSize = value.length();
+        dataOut.writeInt( (int)strSize );
+        if( strSize > 0 ) {
+            dataOut.write( (unsigned char*)value.c_str(), strSize, 0, strSize );
+        }
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string MarshallingSupport::readString16( decaf::io::DataInputStream& dataIn )
+    throw( decaf::io::IOException ) {
+
+    try{
+        int utfLength = dataIn.readShort();
+        if( utfLength > 0 ) {
+
+            std::vector<unsigned char> buffer( utfLength );
+            dataIn.readFully( &buffer[0], utfLength );
+            return std::string( (char*)( &buffer[0] ), utfLength );
+        }
+        return "";
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string MarshallingSupport::readString32( decaf::io::DataInputStream& dataIn )
+    throw( decaf::io::IOException ) {
+
+    try{
+        int utfLength = dataIn.readInt();
+        if( utfLength > 0 ) {
+
+            std::vector<unsigned char> buffer( utfLength );
+            dataIn.readFully( &buffer[0], utfLength );
+            return std::string( (char*)( &buffer[0] ), utfLength );
+        }
+        return "";
+    }
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string MarshallingSupport::asciiToModifiedUtf8( const std::string& asciiString )
+    throw( decaf::io::UTFDataFormatException ) {
+
+    try {
+
+        if( asciiString.length() > 0 ) {
+
+            int utfLength = 0;
+            std::size_t length = asciiString.length();
+
+            for( std::size_t i = 0; i < length; ++i ) {
+
+                unsigned int charValue = (unsigned char)asciiString.at( i );
+
+                // Written to allow for expansion to wide character strings at some
+                // point, as it stands now the value can never be > 255 since the
+                // string class returns a single byte char.
+                if( charValue > 0 && charValue <= 127 ) {
+                    utfLength++;
+                } else if( charValue <= 2047 ) {
+                    utfLength += 2;
+                } else {
+                    utfLength += 3;
+                }
+            }
+
+            if( utfLength > Integer::MAX_VALUE ) {
+                throw UTFDataFormatException(
+                    __FILE__, __LINE__,
+                    ( std::string( "MarshallingSupport::asciiToModifiedUtf8 - Cannot marshall " ) +
+                    "string utf8 encoding longer than: 2^31 bytes, supplied string utf8 encoding was: " +
+                    Integer::toString( (int)utfLength ) + " bytes long." ).c_str() );
+            }
+
+            std::string utfBytes( (std::size_t)utfLength, '\0' );
+            unsigned int utfIndex = 0;
+
+            for( std::size_t i = 0; i < length; i++ ) {
+
+                unsigned int charValue = (unsigned char)asciiString.at( i );
+
+                // Written to allow for expansion to wide character strings at some
+                // point, as it stands now the value can never be > 255 since the
+                // string class returns a single byte char.
+                if( charValue > 0 && charValue <= 127 ) {
+                    utfBytes[utfIndex++] = (char)charValue;
+                } else if( charValue <= 2047 ) {
+                    utfBytes[utfIndex++] = (char)(0xc0 | (0x1f & (charValue >> 6)));
+                    utfBytes[utfIndex++] = (char)(0x80 | (0x3f & charValue));
+                } else {
+                    utfBytes[utfIndex++] = (char)(0xe0 | (0x0f & (charValue >> 12)));
+                    utfBytes[utfIndex++] = (char)(0x80 | (0x3f & (charValue >> 6)));
+                    utfBytes[utfIndex++] = (char)(0x80 | (0x3f & charValue));
+                }
+            }
+
+            return utfBytes;
+        } else {
+            return "";
+        }
+    }
+    AMQ_CATCH_RETHROW( decaf::io::UTFDataFormatException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::UTFDataFormatException )
+    AMQ_CATCHALL_THROW( decaf::io::UTFDataFormatException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string MarshallingSupport::modifiedUtf8ToAscii( const std::string modifiedUtf8String )
+    throw( decaf::io::UTFDataFormatException ) {
+
+    try {
+
+        std::size_t utfLength = modifiedUtf8String.length();
+
+        if( utfLength == 0 ) {
+            return "";
+        }
+
+        std::vector<unsigned char> result( utfLength );
+
+        std::size_t count = 0;
+        std::size_t index = 0;
+        unsigned char a = 0;
+
+        while( count < utfLength ) {
+            if( ( result[index] = modifiedUtf8String[count++] ) < 0x80 ) {
+                index++;
+            } else if( ( ( a = result[index] ) & 0xE0 ) == 0xC0 ) {
+                if( count >= utfLength ) {
+                    throw UTFDataFormatException(
+                        __FILE__, __LINE__,
+                        "Invalid UTF-8 encoding found, start of two byte char found at end.");
+                }
+
+                unsigned char b = modifiedUtf8String[count++];
+                if( ( b & 0xC0 ) != 0x80 ) {
+                    throw UTFDataFormatException(
+                        __FILE__, __LINE__,
+                        "Invalid UTF-8 encoding found, byte two does not start with 0x80." );
+                }
+
+                // 2-byte UTF8 encoding: 110X XXxx 10xx xxxx
+                // Bits set at 'X' means we have encountered a UTF8 encoded value
+                // greater than 255, which is not supported.
+                if( a & 0x1C ) {
+                    throw UTFDataFormatException(
+                        __FILE__, __LINE__,
+                        "Invalid 2 byte UTF-8 encoding found, "
+                        "This method only supports encoded ASCII values of (0-255)." );
+                }
+
+                result[index++] = (unsigned char)( ( ( a & 0x1F ) << 6 ) | ( b & 0x3F ) );
+
+            } else if( ( a & 0xF0 ) == 0xE0 ) {
+
+                if( count + 1 >= utfLength ) {
+                    throw UTFDataFormatException(
+                        __FILE__, __LINE__,
+                        "Invalid UTF-8 encoding found, start of three byte char found at end.");
+                } else {
+                    throw UTFDataFormatException(
+                        __FILE__, __LINE__,
+                        "Invalid 3 byte UTF-8 encoding found, "
+                        "This method only supports encoded ASCII values of (0-255)." );
+                }
+
+                // If we were to support multibyte strings in the future this would be
+                // the remainder of this method decoding logic.
+                //
+                //int b = modifiedUtf8String[count++];
+                //int c = modifiedUtf8String[count++];
+                //if( ( ( b & 0xC0 ) != 0x80 ) || ( ( c & 0xC0 ) != 0x80 ) ) {
+                //    throw UTFDataFormatException(
+                //        __FILE__, __LINE__,
+                //        "Invalid UTF-8 encoding found, byte two does not start with 0x80." );
+                //}
+                //
+                //result[inde++] = ( ( a & 0x0F ) << 12 ) |
+                //                 ( ( b & 0x3F ) << 6 ) | ( c & 0x3F );
+
+            } else {
+                throw UTFDataFormatException(
+                    __FILE__, __LINE__, "Invalid UTF-8 encoding found, aborting.");
+            }
+        }
+
+        return std::string( (char*)( &result[0] ), index );
+    }
+    AMQ_CATCH_RETHROW( decaf::io::UTFDataFormatException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, decaf::io::UTFDataFormatException )
+    AMQ_CATCHALL_THROW( decaf::io::UTFDataFormatException )
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.h?rev=922426&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.h Fri Mar 12 21:02:25 2010
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVENQ_UTIL_MARSHALLINGSUPPORT_H_
+#define _ACTIVENQ_UTIL_MARSHALLINGSUPPORT_H_
+
+#include <activemq/util/Config.h>
+
+#include <decaf/io/IOException.h>
+#include <decaf/io/UTFDataFormatException.h>
+
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/DataInputStream.h>
+
+#include <string>
+
+namespace activemq {
+namespace util {
+
+    class AMQCPP_API MarshallingSupport {
+    public:
+
+        MarshallingSupport();
+        virtual ~MarshallingSupport();
+
+    public:  // Openwire Type Marshalling methods
+
+        /**
+         * Write the string object to the given DataOutputStream as Raw bytes, no string
+         * encoding is done on this char values in the string.  User must encode to Modified
+         * UTF-8 as needed.
+         *
+         * @param dataOut
+         *      The DataOutputStream to write the String data to.
+         * @param value
+         *      Thre String value to write in Openwire form.
+         *
+         * @throws IOException if an I/O error occurs while writing the string.
+         */
+        static void writeString( decaf::io::DataOutputStream& dataOut, const std::string& value )
+            throw( decaf::io::IOException );
+
+        /**
+         * Write the string object to the given DataOutputStream as Raw bytes, no string
+         * encoding is done on this char values in the string.  User must encode to Modified
+         * UTF-8 as needed.  This method write out only the size as a short and the string data
+         * no Openwire Type tag is appended.
+         *
+         * @param dataOut
+         *      The DataOutputStream to write the String data to.
+         * @param value
+         *      Thre String value to write in Openwire form.
+         *
+         * @throws IOException if an I/O error occurs while writing the string.
+         */
+        static void writeString16( decaf::io::DataOutputStream& dataOut, const std::string& value )
+            throw( decaf::io::IOException );
+
+        /**
+         * Write the string object to the given DataOutputStream as Raw bytes, no string
+         * encoding is done on this char values in the string.  User must encode to Modified
+         * UTF-8 as needed.  This method write out only the size as a int and the string data
+         * no Openwire Type tag is appended.
+         *
+         * @param dataOut
+         *      The DataOutputStream to write the String data to.
+         * @param value
+         *      Thre String value to write in Openwire form.
+         *
+         * @throws IOException if an I/O error occurs while writing the string.
+         */
+        static void writeString32( decaf::io::DataOutputStream& dataOut, const std::string& value )
+            throw( decaf::io::IOException );
+
+        /**
+         * Reads an Openwire encoded string from the provided DataInputStream.  No string
+         * processing is performed by this method, clients that know the data contains UTF-8
+         * encoded content must use one of the utility methods of this class to decode the UTF-8
+         * data.
+         *
+         * This version assumes a size prefix of 16bits.
+         *
+         * @param dataIn
+         *      The DataInputStream to read the String data from.
+         *
+         * @returns the String value.
+         *
+         * @throws IOException if an I/O error occurs while writing the string.
+         */
+        static std::string readString16( decaf::io::DataInputStream& dataIn )
+            throw( decaf::io::IOException );
+
+        /**
+         * Reads an Openwire encoded string from the provided DataInputStream.  No string
+         * processing is performed by this method, clients that know the data contains UTF-8
+         * encoded content must use one of the utility methods of this class to decode the UTF-8
+         * data.
+         *
+         * This version assumes a size prefix of 32bits.
+         *
+         * @param dataIn
+         *      The DataInputStream to read the String data from.
+         *
+         * @returns the String value.
+         *
+         * @throws IOException if an I/O error occurs while writing the string.
+         */
+        static std::string readString32( decaf::io::DataInputStream& dataIn )
+            throw( decaf::io::IOException );
+
+    public:  // Static Utility Methods.
+
+        /**
+         * Given an ASCII String with byte values [0..255] convert the string to a
+         * string containing the modified UTF-8 form of that same string.  This allows
+         * an ASCII string containing values greater than 127 as well as embedded NULLs
+         * to be sent to a Java client.
+         *
+         * @param asciiString
+         *      The ASCII string to encode as Modified UTF-8
+         *
+         * @return a string containing the Modified UTF-8 encoded form of the provided string.
+         *
+         * @throws UTFDataFormatException if the length of the encoded string would exceed the
+         *         size of an signed integer.
+         */
+        static std::string asciiToModifiedUtf8( const std::string& asciiString )
+            throw( decaf::io::UTFDataFormatException );
+
+        /**
+         * Given a string that contains bytes in the Java Modified UTF-8 format convert
+         * that string back into ASCII values from [0..255].  This will handle any string
+         * sent from a Java client which contains values within the [0..255] range or has
+         * embedded Nulls.  Strings that have encoded values greater than 255 will cause
+         * an exception to be thrown.
+         *
+         * @param modifiedUtf8String
+         *      The string to convert from Modified UTF-8 to ASCII.
+         *
+         * @return the ASCII encoded version of the provided string.
+         *
+         * @throws UTFDataFormatException if the provided string contains invalid data or the
+         *         character values encoded in the string exceed ASCII value 255.
+         */
+        static std::string modifiedUtf8ToAscii( const std::string modifiedUtf8String )
+            throw( decaf::io::UTFDataFormatException );
+
+    };
+
+}}
+
+#endif /* _ACTIVENQ_UTIL_MARSHALLINGSUPPORT_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp?rev=922426&r1=922425&r2=922426&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp Fri Mar 12 21:02:25 2010
@@ -21,7 +21,6 @@
 #include <decaf/io/ByteArrayOutputStream.h>
 #include <decaf/io/DataInputStream.h>
 #include <decaf/io/DataOutputStream.h>
-#include <activemq/wireformat/openwire/utils/OpenwireStringSupport.h>
 #include <activemq/exceptions/ActiveMQException.h>
 #include <decaf/lang/Short.h>
 
@@ -33,7 +32,6 @@ using namespace activemq::util;
 using namespace activemq::exceptions;
 using namespace activemq::wireformat;
 using namespace activemq::wireformat::openwire;
-using namespace activemq::wireformat::openwire::utils;
 using namespace activemq::wireformat::openwire::marshal;
 using namespace decaf;
 using namespace decaf::io;
@@ -283,12 +281,17 @@ void PrimitiveTypesMarshaller::marshalPr
             std::string data = value.getString();
 
             // is the string big??
-            if( data.size() > Short::MAX_VALUE / 4 ) {
+            if( data.size() == 0 ) {
+                dataOut.writeByte( PrimitiveValueNode::STRING_TYPE );
+                dataOut.writeShort( (short)data.size() );
+            } else if( data.size() > Short::MAX_VALUE / 4 ) {
                 dataOut.writeByte( PrimitiveValueNode::BIG_STRING_TYPE );
-                OpenwireStringSupport::writeString( dataOut, &data );
+                dataOut.writeInt( (int)data.size() );
+                dataOut.write( (unsigned char*)data.c_str(), data.length(), 0, data.length() );
             } else {
                 dataOut.writeByte( PrimitiveValueNode::STRING_TYPE );
-                dataOut.writeUTF( data );
+                dataOut.writeShort( (short)data.size() );
+                dataOut.write( (unsigned char*)data.c_str(), data.length(), 0, data.length() );
             }
 
         } else if( value.getType() == PrimitiveValueNode::LIST_TYPE ) {
@@ -401,11 +404,27 @@ PrimitiveValueNode PrimitiveTypesMarshal
                 break;
             }
             case PrimitiveValueNode::STRING_TYPE:
-                value.setString( dataIn.readUTF() );
+            {
+                int utfLength = dataIn.readShort();
+                if( utfLength > 0 ) {
+
+                    std::vector<unsigned char> buffer( utfLength );
+                    dataIn.readFully( &buffer[0], utfLength );
+                    value.setString( std::string( (char*)( &buffer[0] ), utfLength ) );
+                }
                 break;
+            }
             case PrimitiveValueNode::BIG_STRING_TYPE:
-                value.setString( OpenwireStringSupport::readString( dataIn ) );
+            {
+                int utfLength = dataIn.readInt();
+                if( utfLength > 0 ) {
+
+                    std::vector<unsigned char> buffer( utfLength );
+                    dataIn.readFully( &buffer[0], utfLength );
+                    value.setString( std::string( (char*)( &buffer[0] ), utfLength ) );
+                }
                 break;
+            }
             case PrimitiveValueNode::LIST_TYPE:
             {
                 PrimitiveList list;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/Makefile.am?rev=922426&r1=922425&r2=922426&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/Makefile.am Fri Mar 12 21:02:25 2010
@@ -17,7 +17,6 @@
 
 cc_sources = \
     activemq/util/PrimitiveMapBenchmark.cpp \
-    activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.cpp \
     benchmark/PerformanceTimer.cpp \
     decaf/io/ByteArrayInputStreamBenchmark.cpp \
     decaf/io/ByteArrayOutputStreamBenchmark.cpp \
@@ -35,7 +34,6 @@ cc_sources = \
 
 h_sources = \
     activemq/util/PrimitiveMapBenchmark.h \
-    activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.h \
     benchmark/BenchmarkBase.h \
     benchmark/PerformanceTimer.h \
     decaf/io/ByteArrayInputStreamBenchmark.h \

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/testRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/testRegistry.cpp?rev=922426&r1=922425&r2=922426&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/testRegistry.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/testRegistry.cpp Fri Mar 12 21:02:25 2010
@@ -15,9 +15,6 @@
  * limitations under the License.
  */
 
-#include <activemq/wireformat/openwire/utils/OpenWireStringSupportBenchmark.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::OpenWireStringSupportBenchmark );
-
 #include <activemq/util/PrimitiveMapBenchmark.h>
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapBenchmark );
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am?rev=922426&r1=922425&r2=922426&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am Fri Mar 12 21:02:25 2010
@@ -53,6 +53,7 @@ cc_sources = \
     activemq/transport/inactivity/InactivityMonitorTest.cpp \
     activemq/transport/mock/MockTransportFactoryTest.cpp \
     activemq/util/LongSequenceGeneratorTest.cpp \
+    activemq/util/MarshallingSupportTest.cpp \
     activemq/util/MemoryUsageTest.cpp \
     activemq/util/PrimitiveListTest.cpp \
     activemq/util/PrimitiveMapTest.cpp \
@@ -66,7 +67,6 @@ cc_sources = \
     activemq/wireformat/openwire/utils/BooleanStreamTest.cpp \
     activemq/wireformat/openwire/utils/HexTableTest.cpp \
     activemq/wireformat/openwire/utils/MessagePropertyInterceptorTest.cpp \
-    activemq/wireformat/openwire/utils/OpenwireStringSupportTest.cpp \
     decaf/internal/net/URIEncoderDecoderTest.cpp \
     decaf/internal/net/URIHelperTest.cpp \
     decaf/internal/nio/BufferFactoryTest.cpp \
@@ -200,6 +200,7 @@ h_sources = \
     activemq/transport/inactivity/InactivityMonitorTest.h \
     activemq/transport/mock/MockTransportFactoryTest.h \
     activemq/util/LongSequenceGeneratorTest.h \
+    activemq/util/MarshallingSupportTest.h \
     activemq/util/MemoryUsageTest.h \
     activemq/util/PrimitiveListTest.h \
     activemq/util/PrimitiveMapTest.h \
@@ -213,7 +214,6 @@ h_sources = \
     activemq/wireformat/openwire/utils/BooleanStreamTest.h \
     activemq/wireformat/openwire/utils/HexTableTest.h \
     activemq/wireformat/openwire/utils/MessagePropertyInterceptorTest.h \
-    activemq/wireformat/openwire/utils/OpenwireStringSupportTest.h \
     decaf/internal/net/URIEncoderDecoderTest.h \
     decaf/internal/net/URIHelperTest.h \
     decaf/internal/nio/BufferFactoryTest.h \

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp?rev=922426&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp Fri Mar 12 21:02:25 2010
@@ -0,0 +1,315 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "MarshallingSupportTest.h"
+
+#include <activemq/util/MarshallingSupport.h>
+#include <activemq/util/PrimitiveValueNode.h>
+
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/lang/Integer.h>
+#include <decaf/lang/Short.h>
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace activemq;
+using namespace activemq::util;
+
+////////////////////////////////////////////////////////////////////////////////
+MarshallingSupportTest::MarshallingSupportTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+MarshallingSupportTest::~MarshallingSupportTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::writeTestHelper( unsigned char* input, int inputLength,
+                                              unsigned char* expect, int expectLength ) {
+
+    std::string testStr( (char*)input, inputLength );
+    std::string result = MarshallingSupport::asciiToModifiedUtf8( testStr );
+
+    for( int i = 0; i < expectLength; ++i ) {
+        CPPUNIT_ASSERT( (unsigned char)result[i] == expect[i] );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::testAsciiToModifiedUtf8() {
+
+    // Test data with 1-byte UTF8 encoding.
+    {
+        unsigned char input[] = {0x00, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64};
+        unsigned char expect[] = {0xC0, 0x80, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64};
+
+        writeTestHelper( input, sizeof(input)/sizeof(unsigned char),
+                         expect, sizeof(expect)/sizeof(unsigned char) );
+    }
+
+    // Test data with 2-byte UT8 encoding.
+    {
+        unsigned char input[] = {0x00, 0xC2, 0xA9, 0xC3, 0xA6 };
+        unsigned char expect[] = {0xC0, 0x80, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC2, 0xA6 };
+        writeTestHelper( input, sizeof(input)/sizeof(unsigned char),
+                         expect, sizeof(expect)/sizeof(unsigned char)  );
+    }
+
+    // Test data with 1-byte and 2-byte encoding with embedded NULL's.
+    {
+        unsigned char input[] = {0x00, 0x04, 0xC2, 0xA9, 0xC3, 0x00, 0xA6 };
+        unsigned char expect[] = {0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
+
+        writeTestHelper( input, sizeof(input)/sizeof(unsigned char),
+                         expect, sizeof(expect)/sizeof(unsigned char) );
+    }
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::readTestHelper( unsigned char* input, int inputLength,
+                                             unsigned char* expect, int expectLength ) {
+
+    std::string inputString( (char*)input, inputLength );
+    std::string result = MarshallingSupport::modifiedUtf8ToAscii( inputString );
+
+    for( std::size_t i = 0; i < result.length(); ++i ) {
+        CPPUNIT_ASSERT( (unsigned char)result[i] == expect[i] );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::testModifiedUtf8ToAscii() {
+
+    // Test data with 1-byte UTF8 encoding.
+    {
+        unsigned char expect[] = { 0x00, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64 };
+        unsigned char input[] = { 0xC0, 0x80, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64 };
+
+        readTestHelper( input, sizeof(input)/sizeof(unsigned char),
+                        expect, sizeof(expect)/sizeof(unsigned char) );
+    }
+
+    // Test data with 2-byte UT8 encoding.
+    {
+        unsigned char expect[] = { 0x00, 0xC2, 0xA9, 0xC3, 0xA6 };
+        unsigned char input[] = { 0xC0, 0x80, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC2, 0xA6 };
+        readTestHelper( input, sizeof(input)/sizeof(unsigned char),
+                        expect, sizeof(expect)/sizeof(unsigned char)  );
+    }
+
+    // Test data with 1-byte and 2-byte encoding with embedded NULL's.
+    {
+        unsigned char expect[] = { 0x00, 0x04, 0xC2, 0xA9, 0xC3, 0x00, 0xA6 };
+        unsigned char input[] = { 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
+
+        readTestHelper( input, sizeof(input)/sizeof(unsigned char),
+                        expect, sizeof(expect)/sizeof(unsigned char) );
+    }
+
+    // Test with bad UTF-8 encoding, missing 2nd byte of two byte value
+    {
+        unsigned char input[] = { 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xC2, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
+        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+
+        CPPUNIT_ASSERT_THROW_MESSAGE(
+            "Should throw a UTFDataFormatException",
+            MarshallingSupport::modifiedUtf8ToAscii( inputString ),
+            UTFDataFormatException );
+    }
+
+    // Test with bad UTF-8 encoding, encoded value greater than 255
+    {
+        unsigned char input[] = { 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xC2, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
+        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+
+        CPPUNIT_ASSERT_THROW_MESSAGE(
+            "Should throw a UTFDataFormatException",
+            MarshallingSupport::modifiedUtf8ToAscii( inputString ),
+            UTFDataFormatException );
+    }
+
+    // Test data with value greater than 255 in 2-byte encoding.
+    {
+        unsigned char input[] = { 0xC8, 0xA9, 0xC3, 0xA6};
+        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+
+        CPPUNIT_ASSERT_THROW_MESSAGE(
+            "Should throw a UTFDataFormatException",
+            MarshallingSupport::modifiedUtf8ToAscii( inputString ),
+            UTFDataFormatException );
+    }
+
+    // Test data with value greater than 255 in 3-byte encoding.
+    {
+        unsigned char input[] = { 0xE8, 0xA8, 0xA9, 0xC3, 0xA6};
+        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+
+        CPPUNIT_ASSERT_THROW_MESSAGE(
+            "Should throw a UTFDataFormatException",
+            MarshallingSupport::modifiedUtf8ToAscii( inputString ),
+            UTFDataFormatException );
+    }
+
+    // Test with three byte encode that's missing a last byte.
+    {
+        unsigned char input[] = { 0x00, 0x00, 0x00, 0x02, 0xE8, 0xA8};
+        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+
+        CPPUNIT_ASSERT_THROW_MESSAGE(
+            "Should throw a UTFDataFormatException",
+            MarshallingSupport::modifiedUtf8ToAscii( inputString ),
+            UTFDataFormatException );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::testWriteString() {
+
+    {
+        ByteArrayOutputStream baos;
+        ByteArrayInputStream bais;
+        DataOutputStream writer( &baos );
+        DataInputStream dataIn( &bais );
+
+        MarshallingSupport::writeString( writer, "" );
+
+        bais.setByteArray( baos.toByteArray(), baos.size() );
+
+        CPPUNIT_ASSERT( dataIn.read() == PrimitiveValueNode::STRING_TYPE );
+        CPPUNIT_ASSERT( dataIn.readShort() == 0 );
+    }
+    {
+        ByteArrayOutputStream baos;
+        ByteArrayInputStream bais;
+        DataOutputStream writer( &baos );
+        DataInputStream dataIn( &bais );
+
+        MarshallingSupport::writeString( writer, "Hello World" );
+
+        bais.setByteArray( baos.toByteArray(), baos.size() );
+
+        CPPUNIT_ASSERT( dataIn.read() == PrimitiveValueNode::STRING_TYPE );
+        CPPUNIT_ASSERT( dataIn.readShort() == 11 );
+    }
+    {
+        ByteArrayOutputStream baos;
+        ByteArrayInputStream bais;
+        DataOutputStream writer( &baos );
+        DataInputStream dataIn( &bais );
+
+        MarshallingSupport::writeString( writer, std::string( Short::MAX_VALUE, 'A' ) );
+
+        bais.setByteArray( baos.toByteArray(), baos.size() );
+
+        CPPUNIT_ASSERT( dataIn.read() == PrimitiveValueNode::BIG_STRING_TYPE );
+        CPPUNIT_ASSERT( dataIn.readInt() == Short::MAX_VALUE );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::testWriteString16() {
+
+    {
+        ByteArrayOutputStream baos;
+        ByteArrayInputStream bais;
+        DataOutputStream writer( &baos );
+        DataInputStream dataIn( &bais );
+
+        MarshallingSupport::writeString16( writer, "Hello World" );
+        bais.setByteArray( baos.toByteArray(), baos.size() );
+
+        CPPUNIT_ASSERT( dataIn.readShort() == 11 );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::testWriteString32() {
+
+    {
+        ByteArrayOutputStream baos;
+        ByteArrayInputStream bais;
+        DataOutputStream writer( &baos );
+        DataInputStream dataIn( &bais );
+
+        MarshallingSupport::writeString32( writer, "Hello World" );
+        bais.setByteArray( baos.toByteArray(), baos.size() );
+
+        CPPUNIT_ASSERT( dataIn.readInt() == 11 );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::testReadString16() {
+
+    ByteArrayInputStream bytesIn;
+    ByteArrayOutputStream bytesOut;
+
+    DataInputStream dataIn( &bytesIn );
+    DataOutputStream dataOut( &bytesOut );
+
+    string testStr = "This is a test string for Openwire";
+
+    MarshallingSupport::writeString( dataOut, testStr );
+
+    // Move the output back to the input.
+    bytesIn.setByteArray( bytesOut.toByteArray(), bytesOut.size() );
+
+    string resultStr = "";
+    int type = dataIn.read();
+
+    CPPUNIT_ASSERT( type == PrimitiveValueNode::STRING_TYPE );
+
+    CPPUNIT_ASSERT_NO_THROW_MESSAGE(
+        "Should not have thrown a message for valid String type",
+        resultStr = MarshallingSupport::readString16( dataIn ) );
+
+    CPPUNIT_ASSERT( testStr == resultStr );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void MarshallingSupportTest::testReadString32() {
+
+    ByteArrayInputStream bytesIn;
+    ByteArrayOutputStream bytesOut;
+
+    DataInputStream dataIn( &bytesIn );
+    DataOutputStream dataOut( &bytesOut );
+
+    string testStr( (std::size_t)Short::MAX_VALUE, 'a' );
+
+    MarshallingSupport::writeString( dataOut, testStr );
+
+    // Move the output back to the input.
+    bytesIn.setByteArray( bytesOut.toByteArray(), bytesOut.size() );
+
+    string resultStr = "";
+    int type = dataIn.read();
+
+    CPPUNIT_ASSERT( type == PrimitiveValueNode::BIG_STRING_TYPE );
+
+    CPPUNIT_ASSERT_NO_THROW_MESSAGE(
+        "Should not have thrown a message for valid Big String type",
+        resultStr = MarshallingSupport::readString32( dataIn ) );
+
+    CPPUNIT_ASSERT( testStr == resultStr );
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.h?rev=922426&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.h Fri Mar 12 21:02:25 2010
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_UTIL_MARSHALLINGSUPPORTTEST_H_
+#define _ACTIVEMQ_UTIL_MARSHALLINGSUPPORTTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq {
+namespace util {
+
+    class MarshallingSupportTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( MarshallingSupportTest );
+        CPPUNIT_TEST( testWriteString );
+        CPPUNIT_TEST( testWriteString16 );
+        CPPUNIT_TEST( testWriteString32 );
+        CPPUNIT_TEST( testReadString16 );
+        CPPUNIT_TEST( testReadString32 );
+        CPPUNIT_TEST( testAsciiToModifiedUtf8 );
+        CPPUNIT_TEST( testModifiedUtf8ToAscii );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        MarshallingSupportTest();
+        virtual ~MarshallingSupportTest();
+
+        void testWriteString();
+        void testWriteString16();
+        void testWriteString32();
+        void testReadString16();
+        void testReadString32();
+        void testAsciiToModifiedUtf8();
+        void testModifiedUtf8ToAscii();
+
+    private:
+
+        void readTestHelper( unsigned char* input, int inputLength,
+                             unsigned char* expect, int expectLength );
+
+        void writeTestHelper( unsigned char* input, int inputLength,
+                              unsigned char* expect, int expectLength );
+    };
+
+}}
+
+#endif /* _ACTIVEMQ_UTIL_MARSHALLINGSUPPORTTEST_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

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=922426&r1=922425&r2=922426&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp Fri Mar 12 21:02:25 2010
@@ -18,211 +18,211 @@
 // 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/InputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamTest );
-//#include <decaf/io/OutputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamTest );
-//#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/PushbackInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::PushbackInputStreamTest );
-//#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 <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/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/util/MarshallingSupportTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MarshallingSupportTest );
+
+#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/InputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamTest );
+#include <decaf/io/OutputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamTest );
+#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/PushbackInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::PushbackInputStreamTest );
+#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/lang/ArrayPointerTest.h>
@@ -230,79 +230,79 @@ CPPUNIT_TEST_SUITE_REGISTRATION( decaf::
 #include <decaf/lang/StringTest.h>
 CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::StringTest );
 
-//#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 );
-//#include <decaf/util/zip/InflaterTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterTest );
-//#include <decaf/util/zip/Adler32Test.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::Adler32Test );
-//#include <decaf/util/zip/CRC32Test.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CRC32Test );
-//#include <decaf/util/zip/CheckedInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedInputStreamTest );
-//#include <decaf/util/zip/CheckedOutputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedOutputStreamTest );
-//#include <decaf/util/zip/DeflaterOutputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterOutputStreamTest );
-//#include <decaf/util/zip/InflaterInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterInputStreamTest );
+#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 );
+#include <decaf/util/zip/InflaterTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterTest );
+#include <decaf/util/zip/Adler32Test.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::Adler32Test );
+#include <decaf/util/zip/CRC32Test.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CRC32Test );
+#include <decaf/util/zip/CheckedInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedInputStreamTest );
+#include <decaf/util/zip/CheckedOutputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedOutputStreamTest );
+#include <decaf/util/zip/DeflaterOutputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterOutputStreamTest );
+#include <decaf/util/zip/InflaterInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterInputStreamTest );
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Marshaler Tests



Mime
View raw message