activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r503454 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp
Date Sun, 04 Feb 2007 19:04:31 GMT
Author: tabish
Date: Sun Feb  4 11:04:30 2007
New Revision: 503454

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

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h?view=diff&rev=503454&r1=503453&r2=503454
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h
Sun Feb  4 11:04:30 2007
@@ -58,7 +58,7 @@
          */
         virtual DataStructure* cloneDataStructure() const { 
             ActiveMQBytesMessage* message = new ActiveMQBytesMessage();
-            message->copyDataStructure( this );            
+            message->copyDataStructure( this );
             return message;
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp?view=diff&rev=503454&r1=503453&r2=503454
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp
Sun Feb  4 11:04:30 2007
@@ -41,23 +41,39 @@
     myMessage.writeBoolean( false );
     myMessage.writeByte( 127 );
     myMessage.writeShort( 32767 );
+    myMessage.writeUnsignedShort( 65535 );
     myMessage.writeDouble( 0.5622154 );
+    myMessage.writeUTF( "This is a UTF String" );
+    
+    try{
+        myMessage.readInt();
+        CPPUNIT_ASSERT( false );
+    } catch(...) {}
+    
     myMessage.writeDouble( 1.012 );
     myMessage.writeFloat( 10.000005f );
-    
+    myMessage.writeInt( 15645646 );
+    myMessage.writeLong( 0xFFFAAA999LL );
+    myMessage.writeString( "This is a test String" );
+
     CPPUNIT_ASSERT( myMessage.getBodyLength() != 0 );
 
     // Get ready to read
     myMessage.reset();
-    
+
     CPPUNIT_ASSERT( myMessage.readBoolean() == false );
     CPPUNIT_ASSERT( myMessage.readByte() == 127 );
     CPPUNIT_ASSERT( myMessage.readShort() == 32767 );
+    CPPUNIT_ASSERT( myMessage.readUnsignedShort() == 65535 );
     CPPUNIT_ASSERT( myMessage.readDouble() == 0.5622154 );
+    CPPUNIT_ASSERT( myMessage.readUTF() == "This is a UTF String" );    
     CPPUNIT_ASSERT( myMessage.readDouble() == 1.012 );
     CPPUNIT_ASSERT( myMessage.readFloat() == 10.000005f );
-    
+    CPPUNIT_ASSERT( myMessage.readInt() == 15645646 );
+    CPPUNIT_ASSERT( myMessage.readLong() == 0xFFFAAA999ULL );
+    CPPUNIT_ASSERT( myMessage.readString() == "This is a test String" );
+
     myMessage.clearBody();
-    
+
     CPPUNIT_ASSERT( myMessage.getBodyLength() == 0 );
 }



Mime
View raw message