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 2006/10/16 19:26:02 UTC
svn commit: r464574 - in
/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src: main/
main/activemq/connector/openwire/marshal/ test/
test/activemq/connector/openwire/marshal/
Author: tabish
Date: Mon Oct 16 10:26:00 2006
New Revision: 464574
URL: http://svn.apache.org/viewvc?view=rev&rev=464574
Log:
Adding new code for Openwire Support
Added:
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.cpp (with props)
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.h (with props)
Modified:
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/HexTable.cpp
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am?view=diff&rev=464574&r1=464573&r2=464574
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am Mon Oct 16 10:26:00 2006
@@ -220,7 +220,7 @@
cms/MessageProducer.h \
cms/Message.h \
activemq/connector/openwire/marshal/HexTable.h \
- cms/MessageConsumer.h
+ cms/MessageConsumer.h
##
## Compiler / Linker Info
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/HexTable.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/HexTable.cpp?view=diff&rev=464574&r1=464573&r2=464574
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/HexTable.cpp (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/HexTable.cpp Mon Oct 16 10:26:00 2006
@@ -30,9 +30,21 @@
////////////////////////////////////////////////////////////////////////////////
HexTable::HexTable(){
- const char values[] = { 'a', 'b', 'c' };
- table.push_back( "00" );
- table.push_back( "00" );
+ const char values[] =
+ { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b',
+ 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
+ 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' };
+ const int count = 36;
+
+ for( int i = 0; i < count; ++i ) {
+ string entry( 1, values[i] );
+
+ for( int j = 0; j < count; ++j ) {
+ entry += values[j];
+ }
+
+ table.push_back( entry );
+ }
}
////////////////////////////////////////////////////////////////////////////////
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am?view=diff&rev=464574&r1=464573&r2=464574
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am Mon Oct 16 10:26:00 2006
@@ -25,6 +25,7 @@
activemq/connector/stomp/StompConnectorTest.cpp \
activemq/connector/stomp/StompFrameTest.cpp \
activemq/connector/stomp/StompSessionManagerTest.cpp \
+ activemq/connector/openwire/marshal/HexTableTest.cpp \
activemq/core/ActiveMQConnectionFactoryTest.cpp \
activemq/core/ActiveMQConnectionTest.cpp \
activemq/core/ActiveMQDestinationTest.cpp \
Added: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.cpp?view=auto&rev=464574
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.cpp (added)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.cpp Mon Oct 16 10:26:00 2006
@@ -0,0 +1,20 @@
+/*
+ * 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 "HexTableTest.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::connector::openwire::marshal::HexTableTest );
Propchange: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.h?view=auto&rev=464574
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.h (added)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.h Mon Oct 16 10:26:00 2006
@@ -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_CONNECTOR_OPENWIRE_MARSHAL_HEXTABLETEST_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSHAL_HEXTABLETEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <activemq/connector/openwire/marshal/HexTable.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+namespace marshal{
+
+ class HexTableTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( HexTableTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ HexTableTest() {}
+ virtual ~HexTableTest() {}
+
+ void test(){
+
+ HexTable table;
+
+ CPPUNIT_ASSERT( table[0] == "00" );
+ CPPUNIT_ASSERT( table[255] == "FF" );
+
+ CPPUNIT_ASSERT( table.size() == 255 );
+ }
+
+ };
+
+}}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_MARSHAL_HEXTABLETEST_H_*/
Propchange: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/openwire/marshal/HexTableTest.h
------------------------------------------------------------------------------
svn:eol-style = native