activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r598485 - in /activemq/activemq-cpp/decaf/trunk/src/test: Makefile.am decaf/nio/ decaf/nio/ByteBufferTest.cpp decaf/nio/ByteBufferTest.h testRegistry.cpp
Date Tue, 27 Nov 2007 01:16:11 GMT
Author: tabish
Date: Mon Nov 26 17:16:10 2007
New Revision: 598485

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

Working on the NIO package

Added:
    activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/
    activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.cpp
    activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.h
Modified:
    activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am
    activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp

Modified: activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am?rev=598485&r1=598484&r2=598485&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am Mon Nov 26 17:16:10 2007
@@ -53,6 +53,7 @@
   decaf/util/concurrent/CountDownLatchTest.cpp \
   decaf/util/concurrent/MutexTest.cpp \
   decaf/util/concurrent/ThreadPoolTest.cpp \
+  decaf/nio/ByteBufferTest.cpp \
   testRegistry.cpp \
   main.cpp
 
@@ -93,12 +94,13 @@
   decaf/util/SetTest.h \
   decaf/util/concurrent/CountDownLatchTest.h \
   decaf/util/concurrent/MutexTest.h \
-  decaf/util/concurrent/ThreadPoolTest.h
+  decaf/util/concurrent/ThreadPoolTest.h \
+  decaf/nio/ByteBufferTest.h
 
 ## Compile this as part of make check
 check_PROGRAMS = decaf-test
 ## Also run the tests as part of make check
-## TESTS = $(check_PROGRAMS)
+TESTS = $(check_PROGRAMS)
 
 ## 
 ## Compiler/Linker Options

Added: activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.cpp?rev=598485&view=auto
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.cpp (added)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.cpp Mon Nov 26 17:16:10
2007
@@ -0,0 +1,31 @@
+/*
+ * 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 "ByteBufferTest.h"
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::nio;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+
+////////////////////////////////////////////////////////////////////////////////
+void ByteBufferTest::test() {
+
+    CPPUNIT_ASSERT( buffer != NULL );
+    CPPUNIT_ASSERT( buffer->capacity() == 10 );
+}

Added: activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.h?rev=598485&view=auto
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.h (added)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/nio/ByteBufferTest.h Mon Nov 26 17:16:10
2007
@@ -0,0 +1,53 @@
+/*
+ * 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 _DECAF_NIO_BYTEBUFFERTEST_H_
+#define _DECAF_NIO_BYTEBUFFERTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <decaf/nio/ByteBuffer.h>
+
+namespace decaf{
+namespace nio{
+
+    class ByteBufferTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( ByteBufferTest );
+        CPPUNIT_TEST( test );
+        CPPUNIT_TEST_SUITE_END();
+
+    private:
+
+        ByteBuffer* buffer;
+
+    public:
+
+        ByteBufferTest() {}
+        virtual ~ByteBufferTest() {}
+
+        void setUp() { buffer = new ByteBuffer(10); }
+        void tearDown() { delete buffer; }
+
+        void test();
+
+    };
+
+}}
+
+#endif /*_DECAF_NIO_BYTEBUFFERTEST_H_*/

Modified: activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp?rev=598485&r1=598484&r2=598485&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp Mon Nov 26 17:16:10 2007
@@ -23,6 +23,9 @@
 #include <decaf/internal/nio/ByteArrayPerspectiveTest.h>
 CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayPerspectiveTest );
 
+#include <decaf//nio/ByteBufferTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::nio::ByteBufferTest );
+
 //#include <decaf/io/FilterInputStreamTest.h>
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest );
 //#include <decaf/io/FilterOutputStreamTest.h>



Mime
View raw message