activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r593579 [4/4] - in /activemq/activemq-cpp/trunk/src/test/activemq: connector/ connector/openwire/ connector/openwire/commands/ connector/openwire/marshal/ connector/openwire/marshal/v1/ connector/openwire/marshal/v2/ connector/openwire/util...
Date Fri, 09 Nov 2007 16:09:59 GMT
Modified: activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h?rev=593579&r1=593578&r2=593579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.h Fri Nov  9 08:09:53
2007
@@ -64,7 +64,7 @@
         public:
 
             std::vector<cms::Message*> messages;
-            concurrent::Mutex mutex;
+            decaf::util::concurrent::Mutex mutex;
             bool ack;
 
         public:

Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.h?rev=593579&r1=593578&r2=593579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.h (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.h Fri Nov  9 08:09:53
2007
@@ -28,7 +28,7 @@
 #include <activemq/transport/Command.h>
 #include <activemq/transport/TransportExceptionListener.h>
 #include <decaf/util/concurrent/Concurrent.h>
-#include <activemq/io/BlockingByteArrayInputStream.h>
+#include <decaf/io/BlockingByteArrayInputStream.h>
 #include <decaf/io/ByteArrayOutputStream.h>
 #include <decaf/lang/Thread.h>
 #include <decaf/util/concurrent/Mutex.h>
@@ -87,7 +87,7 @@
             /**
              * The target input stream.
              */
-            io::InputStream* inputStream;
+            decaf::io::InputStream* inputStream;
 
         public:
             MyCommandReader(){ throwException = false; }
@@ -95,11 +95,11 @@
 
             bool throwException;
 
-            virtual void setInputStream(io::InputStream* is){
+            virtual void setInputStream(decaf::io::InputStream* is){
                 inputStream = is;
             }
 
-            virtual io::InputStream* getInputStream(void){
+            virtual decaf::io::InputStream* getInputStream(void){
                 return inputStream;
             }
 
@@ -137,11 +137,11 @@
 
             virtual std::size_t read(unsigned char* buffer AMQCPP_UNUSED,
                              std::size_t count AMQCPP_UNUSED)
-                throw( io::IOException ) {
+                throw( decaf::io::IOException ) {
                 return 0;
             }
 
-            virtual unsigned char readByte() throw(io::IOException) {
+            virtual unsigned char readByte() throw(decaf::io::IOException) {
                 return 0;
             }
         };
@@ -152,16 +152,16 @@
             /**
              * Target output stream.
              */
-            io::OutputStream* outputStream;
+            decaf::io::OutputStream* outputStream;
 
         public:
             virtual ~MyCommandWriter(){}
 
-            virtual void setOutputStream(io::OutputStream* os){
+            virtual void setOutputStream(decaf::io::OutputStream* os){
                 outputStream = os;
             }
 
-            virtual io::OutputStream* getOutputStream(void){
+            virtual decaf::io::OutputStream* getOutputStream(void){
                 return outputStream;
             }
 
@@ -184,16 +184,16 @@
 
             virtual void write( const unsigned char* buffer AMQCPP_UNUSED,
                                 std::size_t count AMQCPP_UNUSED)
-                throw(io::IOException) {}
+                throw(decaf::io::IOException) {}
 
-            virtual void writeByte(unsigned char v AMQCPP_UNUSED) throw(io::IOException)
{}
+            virtual void writeByte(unsigned char v AMQCPP_UNUSED) throw(decaf::io::IOException)
{}
         };
 
         class MyExceptionListener : public TransportExceptionListener{
         public:
 
             Transport* transport;
-            concurrent::Mutex mutex;
+            decaf::util::concurrent::Mutex mutex;
 
             MyExceptionListener(){
                 transport = NULL;
@@ -219,8 +219,8 @@
         // transport without any exceptions.
         void testStartClose(){
 
-            io::BlockingByteArrayInputStream is;
-            io::ByteArrayOutputStream os;
+            decaf::io::BlockingByteArrayInputStream is;
+            decaf::io::ByteArrayOutputStream os;
             MyCommandListener listener;
             MyCommandReader reader;
             MyCommandWriter writer;
@@ -242,8 +242,8 @@
 
         void testRead(){
 
-            io::BlockingByteArrayInputStream is;
-            io::ByteArrayOutputStream os;
+            decaf::io::BlockingByteArrayInputStream is;
+            decaf::io::ByteArrayOutputStream os;
             MyCommandListener listener;
             MyCommandReader reader;
             MyCommandWriter writer;
@@ -278,8 +278,8 @@
 
         void testWrite(){
 
-            io::BlockingByteArrayInputStream is;
-            io::ByteArrayOutputStream os;
+            decaf::io::BlockingByteArrayInputStream is;
+            decaf::io::ByteArrayOutputStream os;
             MyCommandListener listener;
             MyCommandReader reader;
             MyCommandWriter writer;
@@ -306,8 +306,8 @@
             cmd.c = '5';
             transport.oneway( &cmd );
 
-            const unsigned char* bytes = os.getByteArray();
-            std::size_t size = os.getByteArraySize();
+            const unsigned char* bytes = os.toByteArray();
+            std::size_t size = os.size();
             CPPUNIT_ASSERT( size >= 5 );
             CPPUNIT_ASSERT( bytes[0] == '1' );
             CPPUNIT_ASSERT( bytes[1] == '2' );
@@ -320,8 +320,8 @@
 
         void testException(){
 
-            io::BlockingByteArrayInputStream is;
-            io::ByteArrayOutputStream os;
+            decaf::io::BlockingByteArrayInputStream is;
+            decaf::io::ByteArrayOutputStream os;
             MyCommandListener listener;
             MyCommandReader reader;
             MyCommandWriter writer;

Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.h?rev=593579&r1=593578&r2=593579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.h
(original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.h
Fri Nov  9 08:09:53 2007
@@ -41,7 +41,7 @@
         public:
 
             virtual Transport* createTransport(
-                const activemq::util::Properties& properties AMQCPP_UNUSED,
+                const decaf::util::Properties& properties AMQCPP_UNUSED,
                 Transport* next = NULL,
                 bool own = true ) throw ( exceptions::ActiveMQException ) {
                     return NULL;

Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.h?rev=593579&r1=593578&r2=593579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.h (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.h Fri
Nov  9 08:09:53 2007
@@ -41,7 +41,7 @@
         public:
 
             virtual Transport* createTransport(
-                const activemq::util::Properties& properties AMQCPP_UNUSED,
+                const decaf::util::Properties& properties AMQCPP_UNUSED,
                 Transport* next = NULL,
                 bool own = true ) throw ( exceptions::ActiveMQException ) {
 

Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/filters/ResponseCorrelatorTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/filters/ResponseCorrelatorTest.h?rev=593579&r1=593578&r2=593579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/filters/ResponseCorrelatorTest.h
(original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/filters/ResponseCorrelatorTest.h
Fri Nov  9 08:09:53 2007
@@ -126,8 +126,8 @@
             CommandListener* listener;
             TransportExceptionListener* exListener;
             decaf::lang::Thread* thread;
-            concurrent::Mutex mutex;
-            concurrent::Mutex startedMutex;
+            decaf::util::concurrent::Mutex mutex;
+            decaf::util::concurrent::Mutex startedMutex;
             bool done;
             std::queue<Command*> requests;
 
@@ -148,7 +148,7 @@
             }
 
             virtual void oneway( Command* command )
-                throw(CommandIOException, exceptions::UnsupportedOperationException)
+                throw(CommandIOException, decaf::lang::exceptions::UnsupportedOperationException)
             {
                 synchronized( &mutex ){
                     requests.push( command );
@@ -157,9 +157,9 @@
             }
 
             virtual Response* request( Command* command AMQCPP_UNUSED)
-                throw(CommandIOException, exceptions::UnsupportedOperationException)
+                throw(CommandIOException, decaf::lang::exceptions::UnsupportedOperationException)
             {
-                throw exceptions::UnsupportedOperationException(
+                throw decaf::lang::exceptions::UnsupportedOperationException(
                     __FILE__,
                     __LINE__,
                     "stuff" );
@@ -290,7 +290,7 @@
 
             int exCount;
             std::set<int> commands;
-            concurrent::Mutex mutex;
+            decaf::util::concurrent::Mutex mutex;
 
         public:
 

Modified: activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveMapTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveMapTest.cpp?rev=593579&r1=593578&r2=593579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveMapTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveMapTest.cpp Fri Nov  9 08:09:53
2007
@@ -77,7 +77,7 @@
     try{
         node.getFloat();
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){
     }
 
     node.clear();
@@ -91,7 +91,7 @@
     try{
         pmap.getBool( "bool" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setBool( "bool", true );
     CPPUNIT_ASSERT( pmap.getBool("bool") == true );
     pmap.setBool( "bool", false );
@@ -100,56 +100,56 @@
     try{
         pmap.getByte( "byte" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setByte( "byte", 1 );
     CPPUNIT_ASSERT( pmap.getByte("byte") == 1 );
 
     try{
         pmap.getChar( "char" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setChar( "char", 'a' );
     CPPUNIT_ASSERT( pmap.getChar("char") == 'a' );
 
     try{
         pmap.getShort( "short" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setShort( "short", 2 );
     CPPUNIT_ASSERT( pmap.getShort("short") == 2 );
 
     try{
         pmap.getInt( "int" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setInt( "int", 3 );
     CPPUNIT_ASSERT( pmap.getInt("int") == 3 );
 
     try{
         pmap.getLong( "long" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setLong( "long", 4L );
     CPPUNIT_ASSERT( pmap.getLong("long") == 4L );
 
     try{
         pmap.getDouble( "double" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setDouble( "double", 2.3 );
     CPPUNIT_ASSERT( pmap.getDouble("double") == 2.3 );
 
     try{
         pmap.getFloat( "float" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setFloat( "float", 3.2f );
     CPPUNIT_ASSERT( pmap.getFloat("float") == 3.2f );
 
     try{
         pmap.getString( "string" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setString( "string", "hello" );
     CPPUNIT_ASSERT( pmap.getString("string") == "hello" );
 
@@ -162,7 +162,7 @@
     try{
         pmap.getByteArray( "byteArray" );
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
     pmap.setByteArray( "byteArray", byteArray );
     CPPUNIT_ASSERT( pmap.getByteArray("byteArray") == byteArray );
 
@@ -178,7 +178,7 @@
     try{
         pmap.getInt("int");
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
 }
 
 void PrimitiveMapTest::testCount(){
@@ -225,17 +225,17 @@
     try{
         pmap.getInt("int");
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
 
     try{
         pmap.getFloat("float");
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
 
     try{
         pmap.getInt("int2");
         CPPUNIT_ASSERT( false );
-    } catch( activemq::exceptions::NoSuchElementException& e ){}
+    } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
 }
 
 void PrimitiveMapTest::testContains(){

Modified: activemq/activemq-cpp/trunk/src/test/activemq/util/URISupportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/util/URISupportTest.cpp?rev=593579&r1=593578&r2=593579&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/URISupportTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/URISupportTest.cpp Fri Nov  9 08:09:53
2007
@@ -23,6 +23,8 @@
 #include <decaf/util/Properties.h>
 
 using namespace std;
+using namespace decaf;
+using namespace decaf::util;
 using namespace activemq;
 using namespace activemq::util;
 
@@ -30,15 +32,15 @@
 void URISupportTest::test()
 {
     string test = "?option1=test1&option2=test2";
-    
+
     Properties map = URISupport::parseQuery( test );
 
     CPPUNIT_ASSERT( map.hasProperty( "option1" ) == true );
     CPPUNIT_ASSERT( map.hasProperty( "option2" ) == true );
-    
+
     CPPUNIT_ASSERT( map.getProperty( "option1", "" ) == "test1" );
     CPPUNIT_ASSERT( map.getProperty( "option2", "" ) == "test2" );
-    
+
     string test2 = "option&option";
 
     try{
@@ -47,12 +49,12 @@
     } catch(...) {}
 
     string test3 = "option1=test1&option2=test2";
-    
+
     map = URISupport::parseQuery( test3 );
 
     CPPUNIT_ASSERT( map.hasProperty( "option1" ) == true );
     CPPUNIT_ASSERT( map.hasProperty( "option2" ) == true );
-    
+
     CPPUNIT_ASSERT( map.getProperty( "option1", "" ) == "test1" );
     CPPUNIT_ASSERT( map.getProperty( "option2", "" ) == "test2" );
 



Mime
View raw message