You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2008/05/31 19:29:18 UTC
svn commit: r662050 [2/3] - in /activemq/activemq-cpp/trunk/src: main/
main/activemq/connector/openwire/marshal/ main/activemq/util/
main/decaf/util/ test/ test/activemq/cmsutil/ test/activemq/connector/
test/activemq/connector/openwire/ test/activemq/...
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/ConnectorFactoryMapRegistrarTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/ConnectorFactoryMapRegistrarTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/ConnectorFactoryMapRegistrarTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/ConnectorFactoryMapRegistrarTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "ConnectorFactoryMapRegistrarTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::ConnectorFactoryMapRegistrarTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/ConnectorFactoryMapTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/ConnectorFactoryMapTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/ConnectorFactoryMapTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/ConnectorFactoryMapTest.cpp Sat May 31 10:29:16 2008
@@ -17,5 +17,3 @@
#include "ConnectorFactoryMapTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::ConnectorFactoryMapTest );
-
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/OpenWireFormatTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/OpenWireFormatTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/OpenWireFormatTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/OpenWireFormatTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "OpenWireFormatTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::OpenWireFormatTest );
-
#include <decaf/util/Properties.h>
#include <activemq/connector/openwire/OpenWireFormat.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQBytesMessageTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQBytesMessageTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQBytesMessageTest );
-
#include <decaf/util/UUID.h>
#include <activemq/connector/openwire/commands/ActiveMQBytesMessage.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQDestinationTest2.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQDestinationTest2.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQDestinationTest );
-
#include <decaf/util/UUID.h>
using namespace std;
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQMapMessageTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQMapMessageTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQMapMessageTest );
-
#include <activemq/connector/openwire/commands/ActiveMQMapMessage.h>
using namespace std;
@@ -33,20 +31,20 @@
void ActiveMQMapMessageTest::test()
{
ActiveMQMapMessage myMessage;
-
+
CPPUNIT_ASSERT( myMessage.getDataStructureType() == ActiveMQMapMessage::ID_ACTIVEMQMAPMESSAGE );
CPPUNIT_ASSERT( myMessage.getMapNames().size() == 0 );
CPPUNIT_ASSERT( myMessage.itemExists( "Something" ) == false );
-
+
std::vector<unsigned char> data;
-
+
data.push_back( 2 );
data.push_back( 4 );
data.push_back( 8 );
data.push_back( 16 );
data.push_back( 32 );
-
+
myMessage.setBoolean( "boolean", false );
myMessage.setByte( "byte", 127 );
myMessage.setChar( "char", 'a' );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQMessageTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQMessageTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQMessageTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQMessageTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQMessageTest );
-
#include <activemq/connector/openwire/commands/ActiveMQMessage.h>
using namespace std;
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQQueueTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQQueueTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQQueueTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQQueueTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQQueueTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQQueueTest );
-
#include <decaf/util/UUID.h>
#include <activemq/connector/openwire/commands/ActiveMQQueue.h>
@@ -35,6 +33,6 @@
void ActiveMQQueueTest::test()
{
ActiveMQQueue myQueue;
-
+
CPPUNIT_ASSERT( myQueue.getDestinationType() == cms::Destination::QUEUE );
}
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTempQueueTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTempQueueTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTempQueueTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTempQueueTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQTempQueueTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQTempQueueTest );
-
#include <decaf/util/UUID.h>
#include <activemq/connector/openwire/commands/ActiveMQTempQueue.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTempTopicTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTempTopicTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTempTopicTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTempTopicTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQTempTopicTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQTempTopicTest );
-
#include <decaf/util/UUID.h>
#include <activemq/connector/openwire/commands/ActiveMQTempTopic.h>
@@ -34,6 +32,6 @@
void ActiveMQTempTopicTest::test()
{
ActiveMQTempTopic myQueue;
-
+
CPPUNIT_ASSERT( myQueue.getDestinationType() == cms::Destination::TEMPORARY_TOPIC );
}
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTextMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTextMessageTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTextMessageTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTextMessageTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQTextMessageTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQTextMessageTest );
-
#include <activemq/connector/openwire/commands/ActiveMQTextMessage.h>
using namespace std;
@@ -35,11 +33,11 @@
ActiveMQTextMessage myMessage;
CPPUNIT_ASSERT( myMessage.getDataStructureType() == ActiveMQTextMessage::ID_ACTIVEMQTEXTMESSAGE );
-
+
const char* testText = "This is some test Text";
-
+
myMessage.setText( testText );
-
+
CPPUNIT_ASSERT( myMessage.getText() == testText );
cms::TextMessage* clonedMessage = myMessage.clone();
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTopicTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTopicTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTopicTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/ActiveMQTopicTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQTopicTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::ActiveMQTopicTest );
-
#include <decaf/util/UUID.h>
#include <activemq/connector/openwire/commands/ActiveMQTopic.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/BrokerIdTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/BrokerIdTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/BrokerIdTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/BrokerIdTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "BrokerIdTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::BrokerIdTest );
-
#include <activemq/connector/openwire/commands/BrokerId.h>
using namespace std;
@@ -32,6 +30,6 @@
void BrokerIdTest::test()
{
BrokerId myCommand;
-
+
CPPUNIT_ASSERT( myCommand.getDataStructureType() == BrokerId::ID_BROKERID );
}
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/BrokerInfoTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/BrokerInfoTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/BrokerInfoTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/commands/BrokerInfoTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "BrokerInfoTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::commands::BrokerInfoTest );
-
#include <activemq/connector/openwire/commands/BrokerInfo.h>
using namespace std;
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/BaseDataStreamMarshallerTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "BaseDataStreamMarshallerTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::BaseDataStreamMarshallerTest );
-
#include <activemq/util/PrimitiveMap.h>
#include <activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h>
#include <activemq/connector/openwire/OpenWireFormatFactory.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/PrimitiveMapMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/PrimitiveMapMarshallerTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/PrimitiveMapMarshallerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/marshal/PrimitiveMapMarshallerTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "PrimitiveMapMarshallerTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::PrimitiveMapMarshallerTest );
-
#include <activemq/util/PrimitiveMap.h>
#include <activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/BooleanStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/BooleanStreamTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/BooleanStreamTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/BooleanStreamTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "BooleanStreamTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::utils::BooleanStreamTest );
-
#include <activemq/connector/openwire/utils/BooleanStream.h>
#include <decaf/io/ByteArrayOutputStream.h>
#include <decaf/io/ByteArrayInputStream.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/HexTableTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/HexTableTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/HexTableTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/HexTableTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "HexTableTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::utils::HexTableTest );
-
#include <activemq/connector/openwire/utils/HexTable.h>
using namespace activemq;
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/openwire/utils/OpenwireStringSupportTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "OpenwireStringSupportTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::utils::OpenwireStringSupportTest );
-
#include <activemq/connector/openwire/utils/OpenwireStringSupport.h>
#include <decaf/io/ByteArrayInputStream.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompCommandReaderTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompCommandReaderTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompCommandReaderTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompCommandReaderTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "StompCommandReaderTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::StompCommandReaderTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompCommandWriterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompCommandWriterTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompCommandWriterTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompCommandWriterTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "StompCommandWriterTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::StompCommandWriterTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompConnectorTest.cpp Sat May 31 10:29:16 2008
@@ -19,8 +19,6 @@
#include <activemq/transport/TransportFactoryMap.h>
#include <decaf/lang/exceptions/UnsupportedOperationException.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::StompConnectorTest );
-
using namespace std;
using namespace activemq;
using namespace activemq::connector;
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompDestinationTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompDestinationTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompDestinationTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompDestinationTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "StompDestinationTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::StompDestinationTest );
-
using namespace std;
using namespace activemq;
using namespace activemq::connector;
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompFrameTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompFrameTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompFrameTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompFrameTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "StompFrameTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::StompFrameTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/StompSessionManagerTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "StompSessionManagerTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::StompSessionManagerTest );
-
#include <activemq/transport/TransportFactoryMap.h>
using namespace activemq;
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/AbortCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/AbortCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/AbortCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/AbortCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "AbortCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::AbortCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/AckCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/AckCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/AckCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/AckCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "AckCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::AckCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/BeginCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/BeginCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/BeginCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/BeginCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "BeginCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::BeginCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/BytesMessageCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "BytesMessageCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::BytesMessageCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/CommandConstantsTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/CommandConstantsTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/CommandConstantsTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/CommandConstantsTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "CommandConstantsTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::CommandConstantsTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/CommitCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/CommitCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/CommitCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/CommitCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "CommitCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::CommitCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ConnectCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ConnectCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ConnectCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ConnectCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "ConnectCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::ConnectCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ConnectedCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "ConnectedCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::ConnectedCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/DisconnectCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "DisconnectCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::DisconnectCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ErrorCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ErrorCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ErrorCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ErrorCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "ErrorCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::ErrorCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/MessageCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/MessageCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/MessageCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/MessageCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "MessageCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::MessageCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/ReceiptCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "ReceiptCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::ReceiptCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/SubscribeCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "SubscribeCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::SubscribeCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/TextMessageCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "TextMessageCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::TextMessageCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/commands/UnsubscribeCommandTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "UnsubscribeCommandTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::commands::UnsubscribeCommandTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/marshal/MarshalerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/marshal/MarshalerTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/marshal/MarshalerTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/connector/stomp/marshal/MarshalerTest.cpp Sat May 31 10:29:16 2008
@@ -16,5 +16,3 @@
*/
#include "MarshalerTest.h"
-
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::stomp::marshal::MarshalerTest );
Modified: activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQConnectionFactoryTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionFactoryTest );
-
#include <decaf/util/concurrent/Concurrent.h>
#include <decaf/util/concurrent/Mutex.h>
#include <decaf/lang/Thread.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQConnectionTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQConnectionTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionTest );
-
#include <decaf/util/concurrent/Concurrent.h>
#include <decaf/util/concurrent/Mutex.h>
#include <decaf/lang/Thread.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/core/ActiveMQSessionTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "ActiveMQSessionTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQSessionTest );
-
#include <decaf/lang/Thread.h>
#include <activemq/transport/MockTransportFactory.h>
#include <activemq/transport/TransportFactoryMap.h>
Modified: activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.cpp Sat May 31 10:29:16 2008
@@ -17,5 +17,20 @@
#include "ActiveMQExceptionTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::exceptions::ActiveMQExceptionTest );
+using namespace activemq;
+using namespace activemq::exceptions;
+////////////////////////////////////////////////////////////////////////////////
+void ActiveMQExceptionTest::testMessage0(){
+ char* text = "This is a test";
+ ActiveMQException ex( __FILE__, __LINE__, text );
+ CPPUNIT_ASSERT( strcmp( ex.getMessage().c_str(), text ) == 0 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ActiveMQExceptionTest::testMessage3(){
+ ActiveMQException ex( __FILE__, __LINE__,
+ "This is a test %d %d %d", 1, 100, 1000 );
+ CPPUNIT_ASSERT( strcmp( ex.getMessage().c_str(),
+ "This is a test 1 100 1000" ) == 0 );
+}
Modified: activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.h?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.h (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/exceptions/ActiveMQExceptionTest.h Sat May 31 10:29:16 2008
@@ -26,33 +26,26 @@
namespace activemq{
namespace exceptions{
-
- class ActiveMQExceptionTest : public CppUnit::TestFixture {
-
- CPPUNIT_TEST_SUITE( ActiveMQExceptionTest );
- CPPUNIT_TEST( testMessage0 );
- CPPUNIT_TEST( testMessage3 );
- CPPUNIT_TEST_SUITE_END();
-
- public:
-
+
+ class ActiveMQExceptionTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( ActiveMQExceptionTest );
+ CPPUNIT_TEST( testMessage0 );
+ CPPUNIT_TEST( testMessage3 );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
virtual ~ActiveMQExceptionTest(){}
-
- virtual void setUp(){};
- virtual void tearDown(){};
- void testMessage0(){
- char* text = "This is a test";
- ActiveMQException ex( __FILE__, __LINE__, text );
- CPPUNIT_ASSERT( strcmp( ex.getMessage().c_str(), text ) == 0 );
- }
-
- void testMessage3(){
- ActiveMQException ex( __FILE__, __LINE__,
- "This is a test %d %d %d", 1, 100, 1000 );
- CPPUNIT_ASSERT( strcmp( ex.getMessage().c_str(), "This is a test 1 100 1000" ) == 0 );
- }
- };
-
+
+ virtual void setUp(){}
+ virtual void tearDown(){}
+
+ void testMessage0();
+ void testMessage3();
+
+ };
+
}}
#endif /*ACTIVEMQ_EXCEPTIONS_ACTIVEMQEXCEPTIONTEST_H_*/
Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "IOTransportTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::IOTransportTest );
-
using namespace activemq;
using namespace activemq::transport;
using namespace activemq::exceptions;
Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.cpp Sat May 31 10:29:16 2008
@@ -17,4 +17,17 @@
#include "TransportFactoryMapRegistrarTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::TransportFactoryMapRegistrarTest );
+using namespace activemq;
+using namespace activemq::transport;
+
+////////////////////////////////////////////////////////////////////////////////
+void TransportFactoryMapRegistrarTest::test(){
+
+ {
+ TransportFactoryMapRegistrar registrar("Test", new TestTransportFactory());
+
+ CPPUNIT_ASSERT( TransportFactoryMap::getInstance().lookup("Test") != NULL);
+ }
+
+ CPPUNIT_ASSERT( TransportFactoryMap::getInstance().lookup( "Test" ) == NULL );
+}
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=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.h (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapRegistrarTest.h Sat May 31 10:29:16 2008
@@ -50,16 +50,8 @@
virtual ~TransportFactoryMapRegistrarTest(){}
- void test(){
+ void test();
- {
- TransportFactoryMapRegistrar registrar("Test", new TestTransportFactory());
-
- CPPUNIT_ASSERT( TransportFactoryMap::getInstance().lookup("Test") != NULL);
- }
-
- CPPUNIT_ASSERT( TransportFactoryMap::getInstance().lookup( "Test" ) == NULL );
- }
};
}}
Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.cpp Sat May 31 10:29:16 2008
@@ -17,5 +17,34 @@
#include "TransportFactoryMapTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::TransportFactoryMapTest );
+using namespace activemq;
+using namespace activemq::transport;
+////////////////////////////////////////////////////////////////////////////////
+void TransportFactoryMapTest::test(){
+
+ TransportFactoryMap& factMap =
+ TransportFactoryMap::getInstance();
+ TestTransportFactory testFactory;
+
+ factMap.registerTransportFactory( "test", &testFactory );
+
+ CPPUNIT_ASSERT( factMap.lookup( "test" ) == &testFactory );
+
+ std::vector<std::string> names;
+ CPPUNIT_ASSERT( factMap.getFactoryNames( names ) >= 1 );
+
+ bool found = false;
+ for( unsigned int i = 0; i < names.size(); ++i )
+ {
+ if( names[i] == "test" )
+ {
+ found = true;
+ break;
+ }
+ }
+ CPPUNIT_ASSERT( found );
+
+ factMap.unregisterTransportFactory( "test" );
+ CPPUNIT_ASSERT( factMap.lookup( "test" ) == 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=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.h (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/TransportFactoryMapTest.h Sat May 31 10:29:16 2008
@@ -51,33 +51,8 @@
virtual ~TransportFactoryMapTest(){}
- void test(){
+ void test();
- TransportFactoryMap& factMap =
- TransportFactoryMap::getInstance();
- TestTransportFactory testFactory;
-
- factMap.registerTransportFactory( "test", &testFactory );
-
- CPPUNIT_ASSERT( factMap.lookup( "test" ) == &testFactory );
-
- std::vector<std::string> names;
- CPPUNIT_ASSERT( factMap.getFactoryNames( names ) >= 1 );
-
- bool found = false;
- for( unsigned int i = 0; i < names.size(); ++i )
- {
- if( names[i] == "test" )
- {
- found = true;
- break;
- }
- }
- CPPUNIT_ASSERT( found );
-
- factMap.unregisterTransportFactory( "test" );
- CPPUNIT_ASSERT( factMap.lookup( "test" ) == NULL );
- }
};
}}
Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/filters/ResponseCorrelatorTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/filters/ResponseCorrelatorTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/filters/ResponseCorrelatorTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/filters/ResponseCorrelatorTest.cpp Sat May 31 10:29:16 2008
@@ -17,5 +17,209 @@
#include "ResponseCorrelatorTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::filters::ResponseCorrelatorTest );
+using namespace activemq;
+using namespace activemq::transport;
+using namespace activemq::transport::filters;
+////////////////////////////////////////////////////////////////////////////////
+void ResponseCorrelatorTest::testBasics(){
+
+ try{
+
+ MyListener listener;
+ MyTransport transport;
+ ResponseCorrelator correlator( &transport, false );
+ correlator.setCommandListener( &listener );
+ correlator.setTransportExceptionListener( &listener );
+ CPPUNIT_ASSERT( transport.listener == &correlator );
+ CPPUNIT_ASSERT( transport.exListener == &correlator );
+
+ // Give the thread a little time to get up and running.
+ synchronized(&transport.startedMutex)
+ {
+ // Start the transport.
+ correlator.start();
+ transport.startedMutex.wait();
+ }
+
+ // Send one request.
+ MyCommand cmd;
+ Response* resp = correlator.request( &cmd );
+ CPPUNIT_ASSERT( resp != NULL );
+ CPPUNIT_ASSERT( resp->getCorrelationId() == cmd.getCommandId() );
+
+ // Wait to get the message back asynchronously.
+ decaf::lang::Thread::sleep( 100 );
+
+ // Since our transport relays our original command back at us as a
+ // non-response message, check to make sure we received it and that
+ // it is the original command.
+ CPPUNIT_ASSERT( listener.commands.size() == 1 );
+ CPPUNIT_ASSERT( listener.exCount == 0 );
+
+ correlator.close();
+
+ // Destroy the response.
+ delete resp;
+ }
+ AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+ AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ResponseCorrelatorTest::testOneway(){
+
+ try{
+
+ MyListener listener;
+ MyTransport transport;
+ ResponseCorrelator correlator( &transport, false );
+ correlator.setCommandListener( &listener );
+ correlator.setTransportExceptionListener( &listener );
+ CPPUNIT_ASSERT( transport.listener == &correlator );
+ CPPUNIT_ASSERT( transport.exListener == &correlator );
+
+ // Give the thread a little time to get up and running.
+ synchronized(&transport.startedMutex)
+ {
+ // Start the transport.
+ correlator.start();
+
+ transport.startedMutex.wait();
+ }
+
+ // Send many oneway request (we'll get them back asynchronously).
+ const unsigned int numCommands = 1000;
+ MyCommand commands[numCommands];
+ for( unsigned int ix=0; ix<numCommands; ix++ ){
+ correlator.oneway( &commands[ix] );
+ }
+
+ // Give the thread a little time to get all the messages back.
+ decaf::lang::Thread::sleep( 500 );
+
+ // Make sure we got them all back.
+ CPPUNIT_ASSERT( listener.commands.size() == numCommands );
+ CPPUNIT_ASSERT( listener.exCount == 0 );
+
+ correlator.close();
+ }
+ AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+ AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ResponseCorrelatorTest::testTransportException(){
+
+ try{
+
+ MyListener listener;
+ MyBrokenTransport transport;
+ ResponseCorrelator correlator( &transport, false );
+ correlator.setCommandListener( &listener );
+ correlator.setTransportExceptionListener( &listener );
+ CPPUNIT_ASSERT( transport.listener == &correlator );
+ CPPUNIT_ASSERT( transport.exListener == &correlator );
+
+ // Give the thread a little time to get up and running.
+ synchronized(&transport.startedMutex)
+ {
+ // Start the transport.
+ correlator.start();
+
+ transport.startedMutex.wait();
+ }
+
+ // Send one request.
+ MyCommand cmd;
+ try{
+ correlator.request( &cmd );
+ CPPUNIT_ASSERT(false);
+ }catch( CommandIOException& ex ){
+ // Expected.
+ }
+
+ // Wait to make sure we get the asynchronous message back.
+ decaf::lang::Thread::sleep( 200 );
+
+ // Since our transport relays our original command back at us as a
+ // non-response message, check to make sure we received it and that
+ // it is the original command.
+ CPPUNIT_ASSERT( listener.commands.size() == 0 );
+ CPPUNIT_ASSERT( listener.exCount == 1 );
+
+ correlator.close();
+ }
+ AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+ AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ResponseCorrelatorTest::testMultiRequests(){
+
+ try{
+
+ MyListener listener;
+ MyTransport transport;
+ ResponseCorrelator correlator( &transport, false );
+ correlator.setCommandListener( &listener );
+ correlator.setTransportExceptionListener( &listener );
+ CPPUNIT_ASSERT( transport.listener == &correlator );
+ CPPUNIT_ASSERT( transport.exListener == &correlator );
+
+ // Start the transport.
+ correlator.start();
+
+ // Make sure the start command got down to the thread.
+ CPPUNIT_ASSERT( transport.thread != NULL );
+
+ // Give the thread a little time to get up and running.
+ synchronized(&transport.startedMutex)
+ {
+ transport.startedMutex.wait(500);
+ }
+
+ // Start all the requester threads.
+ const unsigned int numRequests = 100;
+ RequestThread requesters[numRequests];
+ for( unsigned int ix=0; ix<numRequests; ++ix ){
+ requesters[ix].setTransport( &correlator );
+ requesters[ix].start();
+ }
+
+ // Make sure we got all the responses and that they were all
+ // what we expected.
+ for( unsigned int ix=0; ix<numRequests; ++ix ){
+ requesters[ix].join();
+ CPPUNIT_ASSERT( requesters[ix].resp != NULL );
+ CPPUNIT_ASSERT( requesters[ix].cmd.getCommandId() == requesters[ix].resp->getCorrelationId() );
+ }
+
+ decaf::lang::Thread::sleep( 60 );
+ synchronized( &listener.mutex )
+ {
+ unsigned int count = 0;
+
+ while( listener.commands.size() != numRequests )
+ {
+ listener.mutex.wait( 75 );
+
+ ++count;
+
+ if( count == numRequests ) {
+ break;
+ }
+ }
+ }
+
+ // Since our transport relays our original command back at us as a
+ // non-response message, check to make sure we received it and that
+ // it is the original command.
+ CPPUNIT_ASSERT( listener.commands.size() == numRequests );
+ CPPUNIT_ASSERT( listener.exCount == 0 );
+
+ correlator.close();
+ }
+ AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+ AMQ_CATCHALL_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=662050&r1=662049&r2=662050&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 Sat May 31 10:29:16 2008
@@ -356,204 +356,11 @@
virtual ~ResponseCorrelatorTest(){}
- void testBasics(){
+ void testBasics();
+ void testOneway();
+ void testTransportException();
+ void testMultiRequests();
- try{
-
- MyListener listener;
- MyTransport transport;
- ResponseCorrelator correlator( &transport, false );
- correlator.setCommandListener( &listener );
- correlator.setTransportExceptionListener( &listener );
- CPPUNIT_ASSERT( transport.listener == &correlator );
- CPPUNIT_ASSERT( transport.exListener == &correlator );
-
- // Give the thread a little time to get up and running.
- synchronized(&transport.startedMutex)
- {
- // Start the transport.
- correlator.start();
- transport.startedMutex.wait();
- }
-
- // Send one request.
- MyCommand cmd;
- Response* resp = correlator.request( &cmd );
- CPPUNIT_ASSERT( resp != NULL );
- CPPUNIT_ASSERT( resp->getCorrelationId() == cmd.getCommandId() );
-
- // Wait to get the message back asynchronously.
- decaf::lang::Thread::sleep( 100 );
-
- // Since our transport relays our original command back at us as a
- // non-response message, check to make sure we received it and that
- // it is the original command.
- CPPUNIT_ASSERT( listener.commands.size() == 1 );
- CPPUNIT_ASSERT( listener.exCount == 0 );
-
- correlator.close();
-
- // Destroy the response.
- delete resp;
- }
- AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
- AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
- }
-
- void testOneway(){
-
- try{
-
- MyListener listener;
- MyTransport transport;
- ResponseCorrelator correlator( &transport, false );
- correlator.setCommandListener( &listener );
- correlator.setTransportExceptionListener( &listener );
- CPPUNIT_ASSERT( transport.listener == &correlator );
- CPPUNIT_ASSERT( transport.exListener == &correlator );
-
- // Give the thread a little time to get up and running.
- synchronized(&transport.startedMutex)
- {
- // Start the transport.
- correlator.start();
-
- transport.startedMutex.wait();
- }
-
- // Send many oneway request (we'll get them back asynchronously).
- const unsigned int numCommands = 1000;
- MyCommand commands[numCommands];
- for( unsigned int ix=0; ix<numCommands; ix++ ){
- correlator.oneway( &commands[ix] );
- }
-
- // Give the thread a little time to get all the messages back.
- decaf::lang::Thread::sleep( 500 );
-
- // Make sure we got them all back.
- CPPUNIT_ASSERT( listener.commands.size() == numCommands );
- CPPUNIT_ASSERT( listener.exCount == 0 );
-
- correlator.close();
- }
- AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
- AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
- }
-
- void testTransportException(){
-
- try{
-
- MyListener listener;
- MyBrokenTransport transport;
- ResponseCorrelator correlator( &transport, false );
- correlator.setCommandListener( &listener );
- correlator.setTransportExceptionListener( &listener );
- CPPUNIT_ASSERT( transport.listener == &correlator );
- CPPUNIT_ASSERT( transport.exListener == &correlator );
-
- // Give the thread a little time to get up and running.
- synchronized(&transport.startedMutex)
- {
- // Start the transport.
- correlator.start();
-
- transport.startedMutex.wait();
- }
-
- // Send one request.
- MyCommand cmd;
- try{
- correlator.request( &cmd );
- CPPUNIT_ASSERT(false);
- }catch( CommandIOException& ex ){
- // Expected.
- }
-
- // Wait to make sure we get the asynchronous message back.
- decaf::lang::Thread::sleep( 200 );
-
- // Since our transport relays our original command back at us as a
- // non-response message, check to make sure we received it and that
- // it is the original command.
- CPPUNIT_ASSERT( listener.commands.size() == 0 );
- CPPUNIT_ASSERT( listener.exCount == 1 );
-
- correlator.close();
- }
- AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
- AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
- }
-
- void testMultiRequests(){
-
- try{
-
- MyListener listener;
- MyTransport transport;
- ResponseCorrelator correlator( &transport, false );
- correlator.setCommandListener( &listener );
- correlator.setTransportExceptionListener( &listener );
- CPPUNIT_ASSERT( transport.listener == &correlator );
- CPPUNIT_ASSERT( transport.exListener == &correlator );
-
- // Start the transport.
- correlator.start();
-
- // Make sure the start command got down to the thread.
- CPPUNIT_ASSERT( transport.thread != NULL );
-
- // Give the thread a little time to get up and running.
- synchronized(&transport.startedMutex)
- {
- transport.startedMutex.wait(500);
- }
-
- // Start all the requester threads.
- const unsigned int numRequests = 100;
- RequestThread requesters[numRequests];
- for( unsigned int ix=0; ix<numRequests; ++ix ){
- requesters[ix].setTransport( &correlator );
- requesters[ix].start();
- }
-
- // Make sure we got all the responses and that they were all
- // what we expected.
- for( unsigned int ix=0; ix<numRequests; ++ix ){
- requesters[ix].join();
- CPPUNIT_ASSERT( requesters[ix].resp != NULL );
- CPPUNIT_ASSERT( requesters[ix].cmd.getCommandId() == requesters[ix].resp->getCorrelationId() );
- }
-
- decaf::lang::Thread::sleep( 60 );
- synchronized( &listener.mutex )
- {
- unsigned int count = 0;
-
- while( listener.commands.size() != numRequests )
- {
- listener.mutex.wait( 75 );
-
- ++count;
-
- if( count == numRequests ) {
- break;
- }
- }
- }
-
- // Since our transport relays our original command back at us as a
- // non-response message, check to make sure we received it and that
- // it is the original command.
- CPPUNIT_ASSERT( listener.commands.size() == numRequests );
- CPPUNIT_ASSERT( listener.exCount == 0 );
-
- correlator.close();
- }
- AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
- AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
- }
};
}}}
Modified: activemq/activemq-cpp/trunk/src/test/activemq/util/LongSequenceGeneratorTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/util/LongSequenceGeneratorTest.cpp?rev=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/LongSequenceGeneratorTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/LongSequenceGeneratorTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "LongSequenceGeneratorTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::LongSequenceGeneratorTest );
-
using namespace activemq;
using namespace activemq::util;
Added: activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveListTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveListTest.cpp?rev=662050&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveListTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveListTest.cpp Sat May 31 10:29:16 2008
@@ -0,0 +1,196 @@
+/*
+ * 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 "PrimitiveListTest.h"
+
+#include <activemq/util/PrimitiveValueNode.h>
+
+using namespace activemq;
+using namespace activemq::util;
+
+void PrimitiveListTest::testSetGet(){
+
+ PrimitiveList plist;
+
+ try{
+ plist.getBool( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setBool( 0, true );
+ CPPUNIT_ASSERT( plist.getBool(0) == true );
+ plist.setBool( 1, false );
+ CPPUNIT_ASSERT( plist.getBool(1) == false );
+
+ try{
+ plist.getByte( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setByte( 0, 1 );
+ CPPUNIT_ASSERT( plist.getByte(0) == 1 );
+
+ try{
+ plist.getChar( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setChar( 0, 'a' );
+ CPPUNIT_ASSERT( plist.getChar(0) == 'a' );
+
+ try{
+ plist.getShort( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setShort( 0, 2 );
+ CPPUNIT_ASSERT( plist.getShort(0) == 2 );
+
+ try{
+ plist.getInt( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setInt( 0, 3 );
+ CPPUNIT_ASSERT( plist.getInt(0) == 3 );
+
+ try{
+ plist.getLong( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setLong( 0, 4L );
+ CPPUNIT_ASSERT( plist.getLong(0) == 4L );
+
+ try{
+ plist.getDouble( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setDouble( 0, 2.3 );
+ CPPUNIT_ASSERT( plist.getDouble(0) == 2.3 );
+
+ try{
+ plist.getFloat( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setFloat( 0, 3.2f );
+ CPPUNIT_ASSERT( plist.getFloat(0) == 3.2f );
+
+ try{
+ plist.getString( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setString( 0, "hello" );
+ CPPUNIT_ASSERT( plist.getString(0) == "hello" );
+
+ std::vector<unsigned char> byteArray;
+ byteArray.push_back( 'a' );
+ byteArray.push_back( 'b' );
+ byteArray.push_back( 'c' );
+ byteArray.push_back( 'd' );
+
+ try{
+ plist.getByteArray( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+ plist.setByteArray( 0, byteArray );
+ CPPUNIT_ASSERT( plist.getByteArray(0) == byteArray );
+
+}
+
+void PrimitiveListTest::testRemove(){
+
+ PrimitiveList plist;
+ plist.setInt( 0, 5 );
+ plist.setFloat( 1, 5.5f );
+ plist.setInt( 2, 6 );
+ plist.remove( 0 );
+ try{
+ plist.getInt(0);
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+}
+
+void PrimitiveListTest::testCount(){
+
+ PrimitiveList plist;
+ CPPUNIT_ASSERT( plist.size() == 0 );
+ plist.setInt( 0, 5 );
+ CPPUNIT_ASSERT( plist.size() == 1);
+ plist.setFloat( 1, 5.5f );
+ CPPUNIT_ASSERT( plist.size() == 2 );
+ plist.setInt( 2, 6 );
+ CPPUNIT_ASSERT( plist.size() == 3 );
+ plist.remove( 0 );
+ CPPUNIT_ASSERT( plist.size() == 2 );
+
+ CPPUNIT_ASSERT( plist.toString() != "" );
+}
+
+void PrimitiveListTest::testCopy(){
+
+ PrimitiveList plist;
+ plist.setInt( 0, 5 );
+ plist.setFloat( 1, 5.5f );
+ plist.setInt( 2, 6 );
+
+ PrimitiveList copy;
+ copy.copy( plist );
+ CPPUNIT_ASSERT( plist.equals( copy ) );
+
+ PrimitiveList copy1( plist );
+ CPPUNIT_ASSERT( plist.equals( copy1 ) );
+}
+
+void PrimitiveListTest::testClear(){
+
+ PrimitiveList plist;
+ plist.setInt( 0, 5 );
+ plist.setFloat( 1, 5.5f );
+ plist.setInt( 2, 6 );
+
+ plist.clear();
+ CPPUNIT_ASSERT( plist.size() == 0 );
+
+ try{
+ plist.getInt( 0 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+
+ try{
+ plist.getFloat( 1 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+
+ try{
+ plist.getInt( 2 );
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){}
+}
+
+void PrimitiveListTest::testContains(){
+
+ PrimitiveList plist;
+
+// CPPUNIT_ASSERT( plist.contains("int") == false );
+//
+// plist.setInt("int", 5 );
+// CPPUNIT_ASSERT( plist.contains("int") == true );
+//
+// plist.setFloat( "float", 5.5f );
+// CPPUNIT_ASSERT( plist.contains("float") == true );
+//
+// plist.setInt("int2", 6 );
+// CPPUNIT_ASSERT( plist.contains("int2") == true );
+//
+// plist.remove("int");
+// CPPUNIT_ASSERT( plist.contains("int") == false );
+}
Added: activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveListTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveListTest.h?rev=662050&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveListTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveListTest.h Sat May 31 10:29:16 2008
@@ -0,0 +1,56 @@
+/*
+ * 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_PRIMITIVELISTTEST_H_
+#define ACTIVEMQ_UTIL_PRIMITIVELISTTEST_H_
+
+#include <activemq/util/PrimitiveList.h>
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace util{
+
+ class PrimitiveListTest : public CppUnit::TestFixture
+ {
+ CPPUNIT_TEST_SUITE( PrimitiveListTest );
+// CPPUNIT_TEST( testSetGet );
+// CPPUNIT_TEST( testRemove );
+// CPPUNIT_TEST( testCount );
+// CPPUNIT_TEST( testClear );
+// CPPUNIT_TEST( testCopy );
+// CPPUNIT_TEST( testContains );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ PrimitiveListTest(){}
+ virtual ~PrimitiveListTest(){}
+
+ void testValueNode();
+ void testSetGet();
+ void testRemove();
+ void testCount();
+ void testCopy();
+ void testClear();
+ void testContains();
+ };
+
+}}
+
+#endif /*ACTIVEMQ_UTIL_PRIMITIVELISTTEST_H_*/
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=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveMapTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveMapTest.cpp Sat May 31 10:29:16 2008
@@ -17,51 +17,52 @@
#include "PrimitiveMapTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapTest );
+#include <activemq/util/PrimitiveValueNode.h>
+using namespace activemq;
using namespace activemq::util;
void PrimitiveMapTest::testValueNode(){
- PrimitiveMap::ValueNode node;
+ PrimitiveValueNode node;
node.setBool( true );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::BOOLEAN_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == BOOLEAN_TYPE );
CPPUNIT_ASSERT( node.getBool() == true );
node.setBool( false );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::BOOLEAN_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == BOOLEAN_TYPE );
CPPUNIT_ASSERT( node.getBool() == false );
node.setByte( 5 );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::BYTE_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == BYTE_TYPE );
CPPUNIT_ASSERT( node.getByte() == 5 );
node.setChar( 'a' );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::CHAR_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == CHAR_TYPE );
CPPUNIT_ASSERT( node.getChar() == 'a' );
node.setShort( 10 );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::SHORT_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == SHORT_TYPE );
CPPUNIT_ASSERT( node.getShort() == 10 );
node.setInt( 10000 );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::INTEGER_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == INTEGER_TYPE );
CPPUNIT_ASSERT( node.getInt() == 10000 );
node.setLong( 100000L );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::LONG_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == LONG_TYPE );
CPPUNIT_ASSERT( node.getLong() == 100000L );
node.setDouble( 2.3 );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::DOUBLE_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == DOUBLE_TYPE );
CPPUNIT_ASSERT( node.getDouble() == 2.3 );
node.setFloat( 3.2f );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::FLOAT_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == FLOAT_TYPE );
CPPUNIT_ASSERT( node.getFloat() == 3.2f );
node.setString( "hello" );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::STRING_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == STRING_TYPE );
CPPUNIT_ASSERT( node.getString() == "hello" );
std::vector<unsigned char> byteArray;
@@ -71,7 +72,7 @@
byteArray.push_back( 'd' );
node.setByteArray( byteArray );
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::BYTE_ARRAY_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == BYTE_ARRAY_TYPE );
CPPUNIT_ASSERT( node.getByteArray() == byteArray );
try{
@@ -81,7 +82,7 @@
}
node.clear();
- CPPUNIT_ASSERT( node.getValueType() == PrimitiveMap::NULL_TYPE );
+ CPPUNIT_ASSERT( node.getValueType() == NULL_TYPE );
}
void PrimitiveMapTest::testSetGet(){
Added: activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveValueNodeTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveValueNodeTest.cpp?rev=662050&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveValueNodeTest.cpp (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveValueNodeTest.cpp Sat May 31 10:29:16 2008
@@ -0,0 +1,120 @@
+/*
+ * 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 "PrimitiveValueNodeTest.h"
+
+#include <activemq/util/PrimitiveValueNode.h>
+
+using namespace activemq;
+using namespace activemq::util;
+
+void PrimitiveValueNodeTest::testValueNode(){
+
+ PrimitiveValueNode node;
+
+ node.setBool( true );
+ CPPUNIT_ASSERT( node.getValueType() == BOOLEAN_TYPE );
+ CPPUNIT_ASSERT( node.getBool() == true );
+ node.setBool( false );
+ CPPUNIT_ASSERT( node.getValueType() == BOOLEAN_TYPE );
+ CPPUNIT_ASSERT( node.getBool() == false );
+
+ node.setByte( 5 );
+ CPPUNIT_ASSERT( node.getValueType() == BYTE_TYPE );
+ CPPUNIT_ASSERT( node.getByte() == 5 );
+
+ node.setChar( 'a' );
+ CPPUNIT_ASSERT( node.getValueType() == CHAR_TYPE );
+ CPPUNIT_ASSERT( node.getChar() == 'a' );
+
+ node.setShort( 10 );
+ CPPUNIT_ASSERT( node.getValueType() == SHORT_TYPE );
+ CPPUNIT_ASSERT( node.getShort() == 10 );
+
+ node.setInt( 10000 );
+ CPPUNIT_ASSERT( node.getValueType() == INTEGER_TYPE );
+ CPPUNIT_ASSERT( node.getInt() == 10000 );
+
+ node.setLong( 100000L );
+ CPPUNIT_ASSERT( node.getValueType() == LONG_TYPE );
+ CPPUNIT_ASSERT( node.getLong() == 100000L );
+
+ node.setDouble( 2.3 );
+ CPPUNIT_ASSERT( node.getValueType() == DOUBLE_TYPE );
+ CPPUNIT_ASSERT( node.getDouble() == 2.3 );
+
+ node.setFloat( 3.2f );
+ CPPUNIT_ASSERT( node.getValueType() == FLOAT_TYPE );
+ CPPUNIT_ASSERT( node.getFloat() == 3.2f );
+
+ node.setString( "hello" );
+ CPPUNIT_ASSERT( node.getValueType() == STRING_TYPE );
+ CPPUNIT_ASSERT( node.getString() == "hello" );
+
+ std::vector<unsigned char> byteArray;
+ byteArray.push_back( 'a' );
+ byteArray.push_back( 'b' );
+ byteArray.push_back( 'c' );
+ byteArray.push_back( 'd' );
+
+ node.setByteArray( byteArray );
+ CPPUNIT_ASSERT( node.getValueType() == BYTE_ARRAY_TYPE );
+ CPPUNIT_ASSERT( node.getByteArray() == byteArray );
+
+ try{
+ node.getFloat();
+ CPPUNIT_ASSERT( false );
+ } catch( decaf::lang::exceptions::NoSuchElementException& e ){
+ }
+
+ node.clear();
+ CPPUNIT_ASSERT( node.getValueType() == NULL_TYPE );
+}
+
+void PrimitiveValueNodeTest::testValueNodeCtors(){
+
+ PrimitiveValueNode tfvalue = true;
+ PrimitiveValueNode bvalue = (unsigned char)60;
+ PrimitiveValueNode cvalue = (char)60;
+ PrimitiveValueNode svalue = (short)32767;
+ PrimitiveValueNode ivalue = (int)4096;
+ PrimitiveValueNode lvalue = 555666777888LL;
+ PrimitiveValueNode fvalue = 0.125f;
+ PrimitiveValueNode dvalue = 10.056;
+ PrimitiveValueNode strValue = "TEST";
+ PrimitiveValueNode bArrayValue = std::vector<unsigned char>();
+
+ CPPUNIT_ASSERT( tfvalue.getBool() == true );
+ CPPUNIT_ASSERT( tfvalue.getValueType() == BOOLEAN_TYPE );
+ CPPUNIT_ASSERT( bvalue.getByte() == 60 );
+ CPPUNIT_ASSERT( bvalue.getValueType() == BYTE_TYPE );
+ CPPUNIT_ASSERT( cvalue.getChar() == (char)60 );
+ CPPUNIT_ASSERT( cvalue.getValueType() == CHAR_TYPE );
+ CPPUNIT_ASSERT( svalue.getShort() == 32767 );
+ CPPUNIT_ASSERT( svalue.getValueType() == SHORT_TYPE );
+ CPPUNIT_ASSERT( ivalue.getInt() == 4096 );
+ CPPUNIT_ASSERT( ivalue.getValueType() == INTEGER_TYPE );
+ CPPUNIT_ASSERT( lvalue.getLong() == 555666777888LL );
+ CPPUNIT_ASSERT( lvalue.getValueType() == LONG_TYPE );
+ CPPUNIT_ASSERT( fvalue.getFloat() == 0.125f );
+ CPPUNIT_ASSERT( fvalue.getValueType() == FLOAT_TYPE );
+ CPPUNIT_ASSERT( dvalue.getDouble() == 10.056 );
+ CPPUNIT_ASSERT( dvalue.getValueType() == DOUBLE_TYPE );
+ CPPUNIT_ASSERT( strValue.getString() == "TEST" );
+ CPPUNIT_ASSERT( strValue.getValueType() == STRING_TYPE );
+ CPPUNIT_ASSERT( bArrayValue.getValueType() == BYTE_ARRAY_TYPE );
+}
Added: activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveValueNodeTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveValueNodeTest.h?rev=662050&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveValueNodeTest.h (added)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/PrimitiveValueNodeTest.h Sat May 31 10:29:16 2008
@@ -0,0 +1,48 @@
+/*
+ * 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_PRIMITIVEVALUENODETEST_H_
+#define ACTIVEMQ_UTIL_PRIMITIVEVALUENODETEST_H_
+
+#include <activemq/util/PrimitiveValueNode.h>
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace util{
+
+ class PrimitiveValueNodeTest : public CppUnit::TestFixture
+ {
+ CPPUNIT_TEST_SUITE( PrimitiveValueNodeTest );
+ CPPUNIT_TEST( testValueNode );
+ CPPUNIT_TEST( testValueNodeCtors );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ PrimitiveValueNodeTest(){}
+ virtual ~PrimitiveValueNodeTest(){}
+
+ void testValueNode();
+ void testValueNodeCtors();
+
+ };
+
+}}
+
+#endif /*ACTIVEMQ_UTIL_PRIMITIVEVALUENODETEST_H_*/
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=662050&r1=662049&r2=662050&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/util/URISupportTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/util/URISupportTest.cpp Sat May 31 10:29:16 2008
@@ -17,8 +17,6 @@
#include "URISupportTest.h"
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::URISupportTest );
-
#include <activemq/util/URISupport.h>
#include <decaf/util/Properties.h>
#include <decaf/lang/System.h>