activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1149333 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/ main/decaf/util/concurrent/ test/ test/decaf/util/concurrent/
Date Thu, 21 Jul 2011 19:35:06 GMT
Author: tabish
Date: Thu Jul 21 19:35:04 2011
New Revision: 1149333

URL: http://svn.apache.org/viewvc?rev=1149333&view=rev
Log:
Implement the FutureTask class and associated tests.  

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.cpp   (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.h   (with props)
Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am?rev=1149333&r1=1149332&r2=1149333&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am Thu Jul 21 19:35:04 2011
@@ -447,6 +447,7 @@ cc_sources = \
     decaf/util/concurrent/ExecutorService.cpp \
     decaf/util/concurrent/Executors.cpp \
     decaf/util/concurrent/Future.cpp \
+    decaf/util/concurrent/FutureTask.cpp \
     decaf/util/concurrent/LinkedBlockingQueue.cpp \
     decaf/util/concurrent/Lock.cpp \
     decaf/util/concurrent/Mutex.cpp \
@@ -1043,6 +1044,7 @@ h_sources = \
     decaf/util/concurrent/ExecutorService.h \
     decaf/util/concurrent/Executors.h \
     decaf/util/concurrent/Future.h \
+    decaf/util/concurrent/FutureTask.h \
     decaf/util/concurrent/LinkedBlockingQueue.h \
     decaf/util/concurrent/Lock.h \
     decaf/util/concurrent/Mutex.h \

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.cpp?rev=1149333&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.cpp Thu Jul 21 19:35:04 2011
@@ -0,0 +1,18 @@
+/*
+ * 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 "FutureTask.h"

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h?rev=1149333&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h Thu Jul 21 19:35:04 2011
@@ -0,0 +1,401 @@
+/*
+ * 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_UTIL_CONCURRENT_FUTURETASK_H_
+#define _DECAF_UTIL_CONCURRENT_FUTURETASK_H_
+
+#include <decaf/util/Config.h>
+
+#include <decaf/lang/Thread.h>
+#include <decaf/lang/Pointer.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
+
+#include <decaf/util/concurrent/RunnableFuture.h>
+#include <decaf/util/concurrent/Callable.h>
+#include <decaf/util/concurrent/Executors.h>
+#include <decaf/util/concurrent/CancellationException.h>
+#include <decaf/util/concurrent/ExecutionException.h>
+#include <decaf/util/concurrent/TimeoutException.h>
+#include <decaf/util/concurrent/TimeUnit.h>
+#include <decaf/util/concurrent/locks/AbstractQueuedSynchronizer.h>
+
+namespace decaf {
+namespace util {
+namespace concurrent {
+
+    using decaf::lang::Pointer;
+
+    /**
+     * A cancellable asynchronous computation. This class provides a base implementation of
+     * Future, with methods to start and cancel a computation, query to see if the computation
+     * is complete, and retrieve the result of the computation. The result can only be retrieved
+     * when the computation has completed; the get method will block if the computation has not
+     * yet completed. Once the computation has completed, the computation cannot be restarted
+     * or canceled.
+     *
+     * A FutureTask can be used to wrap a Callable or Runnable object. Because FutureTask
+     * implements Runnable, a FutureTask can be submitted to an Executor for execution.
+     *
+     * In addition to serving as a standalone class, this class provides protected functionality
+     * that may be useful when creating customized task classes.
+     *
+     * @since 1.0
+     */
+    template<typename T>
+    class FutureTask : public RunnableFuture<T> {
+    private:
+
+        /**
+         * Synchronization control for FutureTask.
+         *
+         * Uses AQS sync state to represent run status
+         */
+        class FutureTaskSync : public locks::AbstractQueuedSynchronizer {
+        private:
+
+            enum SyncState {
+                /** State value representing that task is ready to run */
+                READY = 0,
+                /** State value representing that task is running */
+                RUNNING = 1,
+                /** State value representing that task ran */
+                RAN = 2,
+                /** State value representing that task was canceled */
+                CANCELLED = 4
+            };
+
+            /** The underlying callable */
+            Pointer< Callable<T> > callable;
+
+            /** The result to return from get() */
+            T result;
+
+            /** The exception to throw from get() */
+            Pointer<decaf::lang::Exception> exception;
+
+            // The FutureTask parent of the Sync object.
+            FutureTask* parent;
+
+            /**
+             * The thread running task. When nulled after set/cancel, this indicates that
+             * the results are accessible.
+             */
+            decaf::lang::Thread* runner;
+
+        public:
+
+            FutureTaskSync(FutureTask* parent, Callable<T>* callable) :
+                AbstractQueuedSynchronizer(), callable(callable), result(), exception(), parent(parent), runner(NULL) {
+            }
+
+            virtual ~FutureTaskSync() {
+
+            }
+
+            bool innerIsCancelled() const {
+                return getState() == CANCELLED;
+            }
+
+            bool innerIsDone() const {
+                return ranOrCancelled(getState()) && this->runner == NULL;
+            }
+
+            T innerGet() {
+                this->acquireSharedInterruptibly(0);
+                if (getState() == CANCELLED) {
+                    throw CancellationException();
+                }
+                if (exception != NULL) {
+                    throw ExecutionException(exception.get());
+                }
+                return result;
+            }
+
+            T innerGet(long long nanosTimeout) {
+                if (!tryAcquireSharedNanos(0, nanosTimeout)) {
+                    throw TimeoutException();
+                }
+                if (getState() == CANCELLED) {
+                    throw CancellationException();
+                }
+                if (exception != NULL) {
+                    throw ExecutionException(exception.get());
+                }
+                return result;
+            }
+
+            void innerSet(const T& result) {
+                for (;;) {
+                    int s = getState();
+                    if (s == RAN) {
+                        return;
+                    }
+                    if (s == CANCELLED) {
+                        // aggressively release to set runner to null,
+                        // in case we are racing with a cancel request
+                        // that will try to interrupt runner
+                        releaseShared(0);
+                        return;
+                    }
+                    if (compareAndSetState(s, RAN)) {
+                        this->result = result;
+                        releaseShared(0);
+                        this->parent->done();
+                        return;
+                    }
+                }
+            }
+
+            void innerSetException(const decaf::lang::Exception& t) {
+                for (;;) {
+                    int s = getState();
+                    if (s == RAN) {
+                        return;
+                    }
+                    if (s == CANCELLED) {
+                        // aggressively release to set runner to null,
+                        // in case we are racing with a cancel request
+                        // that will try to interrupt runner
+                        releaseShared(0);
+                        return;
+                    }
+                    if (compareAndSetState(s, RAN)) {
+                        exception.reset(t.clone());
+                        releaseShared(0);
+                        this->parent->done();
+                        return;
+                    }
+                }
+            }
+
+            bool innerCancel(bool mayInterruptIfRunning) {
+                for (;;) {
+                    int s = getState();
+                    if (ranOrCancelled(s)) {
+                        return false;
+                    }
+                    if (compareAndSetState(s, CANCELLED)) {
+                        break;
+                    }
+                }
+
+                if (mayInterruptIfRunning) {
+                    decaf::lang::Thread* r = runner;
+                    if (r != NULL) {
+                        r->interrupt();
+                    }
+                }
+
+                releaseShared(0);
+                this->parent->done();
+                return true;
+            }
+
+            void innerRun() {
+                if (!compareAndSetState(READY, RUNNING)) {
+                    return;
+                }
+
+                runner = decaf::lang::Thread::currentThread();
+                if (getState() == RUNNING) { // recheck after setting thread
+                    T result;
+                    try {
+                        result = this->callable->call();
+                    } catch(decaf::lang::Exception& ex) {
+                        this->parent->setException(ex);
+                        return;
+                    }
+                    this->parent->set(result);
+                } else {
+                    releaseShared(0); // cancel
+                }
+            }
+
+            bool innerRunAndReset() {
+                if (!compareAndSetState(READY, RUNNING)) {
+                    return false;
+                }
+
+                try {
+                    this->runner = decaf::lang::Thread::currentThread();
+                    if (getState() == RUNNING) {
+                        this->callable->call(); // don't set result
+                    }
+                    this->runner = NULL;
+                    return compareAndSetState(RUNNING, READY);
+                } catch(decaf::lang::Exception& ex) {
+                    this->parent->setException(ex);
+                    return false;
+                }
+            }
+
+        protected:
+
+            /**
+             * Implements AQS base acquire to succeed if ran or cancelled
+             */
+            virtual int tryAcquireShared(int ignore) {
+                return innerIsDone() ? 1 : -1;
+            }
+
+            /**
+             * Implements AQS base release to always signal after setting
+             * final done status by nulling runner thread.
+             */
+            virtual bool tryReleaseShared(int ignore) {
+                runner = NULL;
+                return true;
+            }
+
+        private:
+
+            bool ranOrCancelled(int state) const {
+                return (state & (RAN | CANCELLED)) != 0;
+            }
+        };
+
+    private:
+
+        FutureTaskSync* sync;
+
+    public:
+
+        /**
+         * Creates a FutureTask instance that will, upon running, execute the
+         * given Callable.
+         *
+         * @param callable
+         *      The callable task that will be invoked when run.
+         *
+         * @throws NullPointerException if callable pointer is NULL
+         */
+        FutureTask(Callable<T>* callable) : sync(NULL) {
+            if (callable == NULL ) {
+                throw decaf::lang::exceptions::NullPointerException(__FILE__, __LINE__,
+                    "The Callable pointer passed to the constructor was NULL");
+            }
+
+            this->sync = new FutureTaskSync(this, callable);
+        }
+
+        /**
+         * Creates a FutureTask that will, upon running, execute the given Runnable,
+         * and arrange that the get method will return the given result on successful
+         * completion.
+         *
+         * @param runnable
+         *      The runnable task that the future will execute.
+         * @param result
+         *      The result to return on successful completion.
+         *
+         * @throws NullPointerException if runnable is NULL.
+         */
+        FutureTask(decaf::lang::Runnable* runnable, const T& result) {
+            if (runnable == NULL ) {
+                throw decaf::lang::exceptions::NullPointerException(__FILE__, __LINE__,
+                    "The Runnable pointer passed to the constructor was NULL");
+            }
+
+            sync = new FutureTaskSync(this, Executors::callable<T>(runnable, result));
+        }
+
+        virtual ~FutureTask() {
+            try{
+                delete this->sync;
+            }
+            DECAF_CATCHALL_NOTHROW()
+        }
+
+        virtual bool isCancelled() const {
+            return this->sync->innerIsCancelled();
+        }
+
+        virtual bool isDone() const {
+            return this->sync->innerIsDone();
+        }
+
+        virtual bool cancel(bool mayInterruptIfRunning) {
+            return this->sync->innerCancel(mayInterruptIfRunning);
+        }
+
+        virtual T get() {
+            return this->sync->innerGet();
+        }
+
+        virtual T get(long long timeout, const TimeUnit& unit) {
+            return this->sync->innerGet(unit.toNanos(timeout));
+        }
+
+    public:
+
+        /**
+         * Protected method invoked when this task transitions to state isDone
+         * (whether normally or via cancellation). The default implementation
+         * does nothing.  Subclasses may override this method to invoke completion
+         * callbacks or perform bookkeeping. Note that you can query status inside
+         * the implementation of this method to determine whether this task has
+         * been canceled.
+         */
+        virtual void done() {}
+
+        /**
+         * Sets the result of this Future to the given value unless this future
+         * has already been set or has been cancelled.  This method is invoked
+         * internally by the <tt>run</tt> method upon successful completion of
+         * the computation.
+         *
+         * @param v
+         *      The value to return as the result of this Future.
+         */
+        virtual void set(const T& result) {
+            this->sync->innerSet(result);
+        }
+
+        /**
+         * Causes this future to report an ExecutionException with the given
+         * Exception as its cause, unless this Future has already been set or
+         * has been canceled.  This method is invoked internally by the run
+         * method upon failure of the computation.
+         *
+         * @param error
+         *      The cause of failure that is thrown from run.
+         */
+        virtual void setException(const decaf::lang::Exception& error) {
+            this->sync->innerSetException(error);
+        }
+
+        virtual void run() {
+            this->sync->innerRun();
+        }
+
+        /**
+         * Executes the computation without setting its result, and then resets
+         * this Future to initial state, failing to do so if the computation
+         * encounters an exception or is canceled.  This is designed for use
+         * with tasks that intrinsically execute more than once.
+         *
+         * @return true if successfully run and reset
+         */
+        virtual bool runAndReset() {
+            return this->sync->innerRunAndReset();
+        }
+
+    };
+
+}}}
+
+#endif /* _DECAF_UTIL_CONCURRENT_FUTURETASK_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/FutureTask.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am?rev=1149333&r1=1149332&r2=1149333&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am Thu Jul 21 19:35:04 2011
@@ -209,6 +209,7 @@ cc_sources = \
     decaf/util/concurrent/CountDownLatchTest.cpp \
     decaf/util/concurrent/ExecutorsTest.cpp \
     decaf/util/concurrent/ExecutorsTestSupport.cpp \
+    decaf/util/concurrent/FutureTaskTest.cpp \
     decaf/util/concurrent/LinkedBlockingQueueTest.cpp \
     decaf/util/concurrent/MutexTest.cpp \
     decaf/util/concurrent/SemaphoreTest.cpp \
@@ -436,6 +437,7 @@ h_sources = \
     decaf/util/concurrent/CountDownLatchTest.h \
     decaf/util/concurrent/ExecutorsTest.h \
     decaf/util/concurrent/ExecutorsTestSupport.h \
+    decaf/util/concurrent/FutureTaskTest.h \
     decaf/util/concurrent/LinkedBlockingQueueTest.h \
     decaf/util/concurrent/MutexTest.h \
     decaf/util/concurrent/SemaphoreTest.h \

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h?rev=1149333&r1=1149332&r2=1149333&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/ExecutorsTestSupport.h Thu Jul 21 19:35:04 2011
@@ -25,6 +25,7 @@
 #include <decaf/lang/Runnable.h>
 
 #include <decaf/lang/Throwable.h>
+#include <decaf/util/concurrent/Callable.h>
 #include <decaf/util/concurrent/ThreadFactory.h>
 #include <decaf/util/concurrent/ExecutorService.h>
 #include <decaf/util/concurrent/ThreadPoolExecutor.h>
@@ -88,6 +89,20 @@ namespace concurrent {
             }
         };
 
+        template<typename E>
+        class NoOpCallable : public Callable<E> {
+        public:
+
+            NoOpCallable() : decaf::util::concurrent::Callable<E>() {
+            }
+
+            virtual ~NoOpCallable() {}
+
+            virtual E call() {
+                return E();
+            }
+        };
+
         class ShortRunnable : public decaf::lang::Runnable {
         private:
 

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.cpp?rev=1149333&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.cpp Thu Jul 21 19:35:04 2011
@@ -0,0 +1,641 @@
+/*
+ * 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 "FutureTaskTest.h"
+
+#include <decaf/util/LinkedList.h>
+#include <decaf/util/concurrent/FutureTask.h>
+#include <decaf/util/concurrent/Callable.h>
+#include <decaf/lang/Integer.h>
+#include <decaf/lang/Thread.h>
+#include <decaf/lang/exceptions/IllegalArgumentException.h>
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+using namespace decaf::util;
+using namespace decaf::util::concurrent;
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    class PublicFutureTask : public FutureTask<std::string> {
+    public:
+
+        PublicFutureTask(Callable<std::string>* r) : FutureTask<std::string>(r) {}
+
+        virtual ~PublicFutureTask() {}
+
+        virtual bool runAndReset() {
+            return FutureTask::runAndReset();
+        }
+
+        virtual void set(const std::string& x) {
+            FutureTask::set(x);
+        }
+
+        virtual void setException(const Exception& ex) {
+            FutureTask::setException(ex);
+        }
+    };
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+FutureTaskTest::FutureTaskTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+FutureTaskTest::~FutureTaskTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testConstructor1() {
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should have thrown a NullPointerException",
+        new FutureTask<std::string>(NULL),
+        NullPointerException);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testConstructor2() {
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should have thrown a NullPointerException",
+        new FutureTask<std::string>(NULL, "Test"),
+        NullPointerException);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testIsDone() {
+
+    FutureTask<int> task(new NoOpCallable<int>());
+    task.run();
+    CPPUNIT_ASSERT(task.isDone());
+    CPPUNIT_ASSERT(!task.isCancelled());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testRunAndReset() {
+    PublicFutureTask task(new NoOpCallable<std::string>());
+    CPPUNIT_ASSERT(task.runAndReset());
+    CPPUNIT_ASSERT(!task.isDone());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testResetAfterCancel() {
+    PublicFutureTask task(new NoOpCallable<std::string>());
+    CPPUNIT_ASSERT(task.cancel(false));
+    CPPUNIT_ASSERT(!task.runAndReset());
+    CPPUNIT_ASSERT(task.isDone());
+    CPPUNIT_ASSERT(task.isCancelled());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testSet() {
+    PublicFutureTask task(new NoOpCallable<std::string>());
+    task.set("one");
+    try {
+        CPPUNIT_ASSERT_EQUAL(task.get(), std::string("one"));
+    } catch(Exception& e) {
+        unexpectedException();
+    }
+}
+
+#include <typeinfo>
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testSetException() {
+    NoSuchElementException nse;
+    PublicFutureTask task(new NoOpCallable<std::string>());
+    task.setException(nse);
+    try {
+        std::string x = task.get();
+        shouldThrow();
+    } catch(ExecutionException& ee) {
+        const NoSuchElementException* cause =
+            dynamic_cast<const NoSuchElementException*>(ee.getCause());
+        CPPUNIT_ASSERT(cause != NULL);
+    } catch(Exception& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testCancelBeforeRun() {
+    PublicFutureTask task(new NoOpCallable<std::string>());
+    CPPUNIT_ASSERT(task.cancel(false));
+    task.run();
+    CPPUNIT_ASSERT(task.isDone());
+    CPPUNIT_ASSERT(task.isCancelled());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testCancelBeforeRun2() {
+    PublicFutureTask task(new NoOpCallable<std::string>());
+    CPPUNIT_ASSERT(task.cancel(true));
+    task.run();
+    CPPUNIT_ASSERT(task.isDone());
+    CPPUNIT_ASSERT(task.isCancelled());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testCancelAfterRun() {
+    PublicFutureTask task(new NoOpCallable<std::string>());
+    task.run();
+    CPPUNIT_ASSERT(!task.cancel(false));
+    CPPUNIT_ASSERT(task.isDone());
+    CPPUNIT_ASSERT(!task.isCancelled());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    template<typename E>
+    class MediumSleepCallable : public Callable<E> {
+    private:
+
+        FutureTaskTest* parent;
+
+    public:
+
+        MediumSleepCallable(FutureTaskTest* parent) : Callable<E>(), parent(parent) {
+        }
+
+        virtual ~MediumSleepCallable() {
+        }
+
+        virtual E call() {
+            try {
+                Thread::sleep(FutureTaskTest::MEDIUM_DELAY_MS);
+                this->parent->threadShouldThrow();
+            } catch (InterruptedException& success) {
+            }
+
+            return E();
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testCancelInterrupt() {
+
+    FutureTask<std::string> task(new MediumSleepCallable<std::string>(this));
+    Thread t(&task);
+    t.start();
+
+    try {
+        Thread::sleep(SHORT_DELAY_MS);
+        CPPUNIT_ASSERT(task.cancel(true));
+        t.join();
+        CPPUNIT_ASSERT(task.isDone());
+        CPPUNIT_ASSERT(task.isCancelled());
+    } catch(InterruptedException& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    template<typename E>
+    class MediumNoInterruptsSleepCallable : public Callable<E> {
+    private:
+
+        FutureTaskTest* parent;
+
+    public:
+
+        MediumNoInterruptsSleepCallable(FutureTaskTest* parent) : Callable<E>(), parent(parent) {
+        }
+
+        virtual ~MediumNoInterruptsSleepCallable() {
+        }
+
+        virtual E call() {
+            try {
+                Thread::sleep(FutureTaskTest::MEDIUM_DELAY_MS);
+            } catch (InterruptedException& success) {
+                this->parent->threadFail("Should not interrupt");
+            }
+
+            return E();
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testCancelNoInterrupt() {
+
+    FutureTask<std::string> task(new MediumNoInterruptsSleepCallable<std::string>(this));
+    Thread t(&task);
+    t.start();
+
+    try {
+        Thread::sleep(SHORT_DELAY_MS);
+        CPPUNIT_ASSERT(task.cancel(false));
+        t.join();
+        CPPUNIT_ASSERT(task.isDone());
+        CPPUNIT_ASSERT(task.isCancelled());
+    } catch(InterruptedException& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    class MediumNoInterruptsSleepRunnable : public Runnable {
+    private:
+
+        FutureTaskTest* parent;
+        FutureTask<std::string>* task;
+
+    public:
+
+        MediumNoInterruptsSleepRunnable(FutureTaskTest* parent, FutureTask<std::string>* task) :
+            Runnable(), parent(parent), task(task) {
+        }
+
+        virtual ~MediumNoInterruptsSleepRunnable() {
+        }
+
+        virtual void run() {
+            try {
+                task->get();
+            } catch(Exception& e) {
+                this->parent->threadUnexpectedException();
+            }
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testGet1() {
+
+    FutureTask<std::string> ft(new MediumNoInterruptsSleepCallable<std::string>(this));
+    MediumNoInterruptsSleepRunnable runner(this, &ft);
+    Thread t(&runner);
+
+    try {
+        CPPUNIT_ASSERT(!ft.isDone());
+        CPPUNIT_ASSERT(!ft.isCancelled());
+        t.start();
+        Thread::sleep(SHORT_DELAY_MS);
+        ft.run();
+        t.join();
+        CPPUNIT_ASSERT(ft.isDone());
+        CPPUNIT_ASSERT(!ft.isCancelled());
+    } catch(InterruptedException& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    class GetDelayedFutureTaskRunnable : public Runnable {
+    private:
+
+        FutureTaskTest* parent;
+        FutureTask<std::string>* task;
+
+    public:
+
+        GetDelayedFutureTaskRunnable(FutureTaskTest* parent, FutureTask<std::string>* task) :
+            Runnable(), parent(parent), task(task) {
+        }
+
+        virtual ~GetDelayedFutureTaskRunnable() {
+        }
+
+        virtual void run() {
+            try {
+                task->get(FutureTaskTest::SHORT_DELAY_MS, TimeUnit::MILLISECONDS);
+            } catch(TimeoutException& success) {
+            } catch(Exception& e) {
+                this->parent->threadUnexpectedException();
+            }
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testTimedGet1() {
+
+    FutureTask<std::string> ft(new MediumNoInterruptsSleepCallable<std::string>(this));
+    GetDelayedFutureTaskRunnable runner(this, &ft);
+    Thread t(&runner);
+
+    try {
+        CPPUNIT_ASSERT(!ft.isDone());
+        CPPUNIT_ASSERT(!ft.isCancelled());
+        t.start();
+        ft.run();
+        t.join();
+        CPPUNIT_ASSERT(ft.isDone());
+        CPPUNIT_ASSERT(!ft.isCancelled());
+    } catch(InterruptedException& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    template<typename E>
+    class ShortSleepCallable : public Callable<E> {
+    private:
+
+        FutureTaskTest* parent;
+
+    public:
+
+        ShortSleepCallable(FutureTaskTest* parent) : Callable<E>(), parent(parent) {
+        }
+
+        virtual ~ShortSleepCallable() {
+        }
+
+        virtual E call() {
+            try {
+                Thread::sleep(FutureTaskTest::MEDIUM_DELAY_MS);
+                this->parent->threadShouldThrow();
+            } catch (InterruptedException& success) {
+            }
+
+            return E();
+        }
+    };
+
+    class InterruptedGetDelayedFutureTaskRunnable : public Runnable {
+    private:
+
+        FutureTaskTest* parent;
+        FutureTask<std::string>* task;
+
+    public:
+
+        InterruptedGetDelayedFutureTaskRunnable(FutureTaskTest* parent, FutureTask<std::string>* task) :
+            Runnable(), parent(parent), task(task) {
+        }
+
+        virtual ~InterruptedGetDelayedFutureTaskRunnable() {
+        }
+
+        virtual void run() {
+            try {
+                task->get(FutureTaskTest::MEDIUM_DELAY_MS, TimeUnit::MILLISECONDS);
+                this->parent->threadShouldThrow();
+            } catch(CancellationException& success) {
+            } catch(Exception& e) {
+                this->parent->threadUnexpectedException();
+            }
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testTimedGetCancellation() {
+
+    FutureTask<std::string> ft(new ShortSleepCallable<std::string>(this));
+    InterruptedGetDelayedFutureTaskRunnable runner(this, &ft);
+
+    try {
+        Thread t1(&runner);
+        Thread t2(&ft);
+        t1.start();
+        t2.start();
+        Thread::sleep(SHORT_DELAY_MS);
+        ft.cancel(true);
+        t1.join();
+        t2.join();
+    } catch(InterruptedException& ie) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    class CancelledGetFutureTaskRunnable : public Runnable {
+    private:
+
+        FutureTaskTest* parent;
+        FutureTask<std::string>* task;
+
+    public:
+
+        CancelledGetFutureTaskRunnable(FutureTaskTest* parent, FutureTask<std::string>* task) :
+            Runnable(), parent(parent), task(task) {
+        }
+
+        virtual ~CancelledGetFutureTaskRunnable() {
+        }
+
+        virtual void run() {
+            try {
+                task->get();
+                this->parent->threadShouldThrow();
+            } catch(CancellationException& success) {
+            } catch(Exception& e) {
+                this->parent->threadUnexpectedException();
+            }
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testGetCancellation() {
+
+    FutureTask<std::string> ft(new MediumSleepCallable<std::string>(this));
+    CancelledGetFutureTaskRunnable runner(this, &ft);
+
+    try {
+        Thread t1(&runner);
+        Thread t2(&ft);
+        t1.start();
+        t2.start();
+        Thread::sleep(SHORT_DELAY_MS);
+        ft.cancel(true);
+        t1.join();
+        t2.join();
+    } catch(InterruptedException& success) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    template<typename E>
+    class ErrorThrowingCallable : public Callable<E> {
+    private:
+
+        FutureTaskTest* parent;
+
+    public:
+
+        ErrorThrowingCallable(FutureTaskTest* parent) : Callable<E>(), parent(parent) {
+        }
+
+        virtual ~ErrorThrowingCallable() {
+        }
+
+        virtual E call() {
+            throw Exception(__FILE__, __LINE__, "Something aweful");
+            return E();
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testGetExecutionException() {
+
+    FutureTask<std::string> ft(new ErrorThrowingCallable<std::string>(this));
+
+    try {
+        ft.run();
+        ft.get();
+        shouldThrow();
+    } catch(ExecutionException& success) {
+    } catch(Exception& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testTimedGetExecutionException2() {
+
+    FutureTask<std::string> ft(new ErrorThrowingCallable<std::string>(this));
+
+    try {
+        ft.run();
+        ft.get(SHORT_DELAY_MS, TimeUnit::MILLISECONDS);
+        shouldThrow();
+    } catch(ExecutionException& success) {
+    } catch(TimeoutException& success) {
+    } catch(Exception& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    class InterruptableFutureTaskGetRunnable : public Runnable {
+    private:
+
+        FutureTaskTest* parent;
+        FutureTask<std::string>* task;
+
+    public:
+
+        InterruptableFutureTaskGetRunnable(FutureTaskTest* parent, FutureTask<std::string>* task) :
+            Runnable(), parent(parent), task(task) {
+        }
+
+        virtual ~InterruptableFutureTaskGetRunnable() {
+        }
+
+        virtual void run() {
+            try {
+                task->get();
+                this->parent->threadShouldThrow();
+            } catch(InterruptedException& success) {
+            } catch(Exception& e) {
+                this->parent->threadUnexpectedException();
+            }
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testGetInterruptedException() {
+
+    FutureTask<std::string> ft(new NoOpCallable<std::string>());
+    Thread t(&ft);
+
+    try {
+        t.start();
+        Thread::sleep( SHORT_DELAY_MS);
+        t.interrupt();
+        t.join();
+    } catch(Exception& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    class InterruptableFutureTaskLongTimeoutGetRunnable : public Runnable {
+    private:
+
+        FutureTaskTest* parent;
+        FutureTask<std::string>* task;
+
+    public:
+
+        InterruptableFutureTaskLongTimeoutGetRunnable(FutureTaskTest* parent, FutureTask<std::string>* task) :
+            Runnable(), parent(parent), task(task) {
+        }
+
+        virtual ~InterruptableFutureTaskLongTimeoutGetRunnable() {
+        }
+
+        virtual void run() {
+            try {
+                task->get(FutureTaskTest::LONG_DELAY_MS,TimeUnit::MILLISECONDS);
+                this->parent->threadShouldThrow();
+            } catch(InterruptedException& success) {
+            } catch(Exception& e) {
+                this->parent->threadUnexpectedException();
+            }
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testTimedGetInterruptedException2() {
+    FutureTask<std::string> ft(new NoOpCallable<std::string>());
+    InterruptableFutureTaskLongTimeoutGetRunnable runner(this, &ft);
+    Thread t(&runner);
+
+    try {
+        t.start();
+        Thread::sleep(SHORT_DELAY_MS);
+        t.interrupt();
+        t.join();
+    } catch(Exception& e) {
+        unexpectedException();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void FutureTaskTest::testGetTimeoutException() {
+    try {
+        FutureTask<std::string> ft(new NoOpCallable<std::string>());
+        ft.get(1, TimeUnit::MILLISECONDS);
+        shouldThrow();
+    } catch(TimeoutException& success) {
+    } catch(Exception& success) {
+        unexpectedException();
+    }
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.h?rev=1149333&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.h Thu Jul 21 19:35:04 2011
@@ -0,0 +1,84 @@
+/*
+ * 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_UTIL_CONCURRENT_FUTURETASKTEST_H_
+#define _DECAF_UTIL_CONCURRENT_FUTURETASKTEST_H_
+
+#include <decaf/util/concurrent/ExecutorsTestSupport.h>
+
+namespace decaf {
+namespace util {
+namespace concurrent {
+
+    class FutureTaskTest : public ExecutorsTestSupport {
+
+        CPPUNIT_TEST_SUITE( FutureTaskTest );
+        CPPUNIT_TEST( testConstructor1 );
+        CPPUNIT_TEST( testConstructor2 );
+        CPPUNIT_TEST( testIsDone );
+        CPPUNIT_TEST( testRunAndReset );
+        CPPUNIT_TEST( testResetAfterCancel );
+        CPPUNIT_TEST( testSet );
+        CPPUNIT_TEST( testSetException );
+        CPPUNIT_TEST( testCancelBeforeRun );
+        CPPUNIT_TEST( testCancelBeforeRun2 );
+        CPPUNIT_TEST( testCancelAfterRun );
+        CPPUNIT_TEST( testCancelInterrupt );
+        CPPUNIT_TEST( testCancelNoInterrupt );
+        CPPUNIT_TEST( testGet1 );
+        CPPUNIT_TEST( testTimedGet1 );
+        CPPUNIT_TEST( testTimedGetCancellation );
+        CPPUNIT_TEST( testGetCancellation );
+        CPPUNIT_TEST( testGetExecutionException );
+        CPPUNIT_TEST( testTimedGetExecutionException2 );
+        CPPUNIT_TEST( testGetInterruptedException );
+        CPPUNIT_TEST( testTimedGetInterruptedException2 );
+        CPPUNIT_TEST( testGetTimeoutException );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        FutureTaskTest();
+        virtual ~FutureTaskTest();
+
+        void testConstructor1();
+        void testConstructor2();
+        void testIsDone();
+        void testRunAndReset();
+        void testResetAfterCancel();
+        void testSet();
+        void testSetException();
+        void testCancelBeforeRun();
+        void testCancelBeforeRun2();
+        void testCancelAfterRun();
+        void testCancelInterrupt();
+        void testCancelNoInterrupt();
+        void testGet1();
+        void testTimedGet1();
+        void testTimedGetCancellation();
+        void testGetCancellation();
+        void testGetExecutionException();
+        void testTimedGetExecutionException2();
+        void testGetInterruptedException();
+        void testTimedGetInterruptedException2();
+        void testGetTimeoutException();
+
+    };
+
+}}}
+
+#endif /* _DECAF_UTIL_CONCURRENT_FUTURETASKTEST_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/concurrent/FutureTaskTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp?rev=1149333&r1=1149332&r2=1149333&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp Thu Jul 21 19:35:04 2011
@@ -18,340 +18,342 @@
 // All CPP Unit tests are registered in here so we can disable them and
 // enable them easily in one place.
 
-#include <activemq/commands/BrokerInfoTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerInfoTest );
-#include <activemq/commands/BrokerIdTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerIdTest );
-#include <activemq/commands/ActiveMQTopicTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTopicTest );
-#include <activemq/commands/ActiveMQTextMessageTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTextMessageTest );
-#include <activemq/commands/ActiveMQTempTopicTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempTopicTest );
-#include <activemq/commands/ActiveMQTempQueueTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempQueueTest );
-#include <activemq/commands/ActiveMQQueueTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQQueueTest );
-#include <activemq/commands/ActiveMQMessageTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMessageTest );
-#include <activemq/commands/ActiveMQMapMessageTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMapMessageTest );
-#include <activemq/commands/ActiveMQDestinationTest2.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQDestinationTest );
-#include <activemq/commands/ActiveMQBytesMessageTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQBytesMessageTest );
-#include <activemq/commands/ActiveMQStreamMessageTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQStreamMessageTest );
-#include <activemq/commands/XATransactionIdTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::XATransactionIdTest );
-
-#include <activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::BaseDataStreamMarshallerTest );
-#include <activemq/wireformat/openwire/marshal/PrimitiveTypesMarshallerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::PrimitiveTypesMarshallerTest );
-
-#include <activemq/wireformat/openwire/utils/BooleanStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::BooleanStreamTest );
-#include <activemq/wireformat/openwire/utils/HexTableTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::HexTableTest );
-#include <activemq/wireformat/openwire/utils/MessagePropertyInterceptorTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::MessagePropertyInterceptorTest );
-
-#include <activemq/wireformat/openwire/OpenWireFormatTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::OpenWireFormatTest );
-
-#include <activemq/cmsutil/CmsAccessorTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsAccessorTest );
-#include <activemq/cmsutil/CmsDestinationAccessorTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsDestinationAccessorTest );
-#include <activemq/cmsutil/CmsTemplateTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsTemplateTest );
-#include <activemq/cmsutil/DynamicDestinationResolverTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::DynamicDestinationResolverTest );
-#include <activemq/cmsutil/SessionPoolTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::SessionPoolTest );
-
-#include <activemq/core/ActiveMQConnectionFactoryTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionFactoryTest );
-#include <activemq/core/ActiveMQConnectionTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionTest );
-#include <activemq/core/ActiveMQSessionTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQSessionTest );
-#include <activemq/core/FifoMessageDispatchChannelTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::FifoMessageDispatchChannelTest );
-#include <activemq/core/SimplePriorityMessageDispatchChannelTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::SimplePriorityMessageDispatchChannelTest );
-
-#include <activemq/state/ConnectionStateTrackerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTrackerTest );
-#include <activemq/state/ConnectionStateTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTest );
-#include <activemq/state/ConsumerStateTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConsumerStateTest );
-#include <activemq/state/ProducerStateTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ProducerStateTest );
-#include <activemq/state/SessionStateTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::SessionStateTest );
-#include <activemq/state/TransactionStateTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::TransactionStateTest );
-
-#include <activemq/transport/failover/FailoverTransportTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::failover::FailoverTransportTest );
-
-#include <activemq/transport/correlator/ResponseCorrelatorTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::correlator::ResponseCorrelatorTest );
-
-#include <activemq/transport/mock/MockTransportFactoryTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::mock::MockTransportFactoryTest );
-
-#include <activemq/transport/inactivity/InactivityMonitorTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::inactivity::InactivityMonitorTest );
-
-#include <activemq/transport/TransportRegistryTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::TransportRegistryTest );
-#include <activemq/transport/IOTransportTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::IOTransportTest );
-
-#include <activemq/exceptions/ActiveMQExceptionTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::exceptions::ActiveMQExceptionTest );
-
-#include <activemq/util/IdGeneratorTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::IdGeneratorTest );
-#include <activemq/util/LongSequenceGeneratorTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::LongSequenceGeneratorTest );
-#include <activemq/util/PrimitiveValueNodeTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueNodeTest );
-#include <activemq/util/PrimitiveListTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveListTest );
-#include <activemq/util/PrimitiveMapTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapTest );
-#include <activemq/util/PrimitiveValueConverterTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueConverterTest );
-#include <activemq/util/URISupportTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::URISupportTest );
-#include <activemq/util/MemoryUsageTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MemoryUsageTest );
-#include <activemq/util/MarshallingSupportTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MarshallingSupportTest );
-
-#include <activemq/threads/SchedulerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::SchedulerTest );
-#include <activemq/threads/DedicatedTaskRunnerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::DedicatedTaskRunnerTest );
-#include <activemq/threads/CompositeTaskRunnerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::CompositeTaskRunnerTest );
-
-#include <activemq/wireformat/WireFormatRegistryTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::WireFormatRegistryTest );
-
-#include <decaf/internal/util/ByteArrayAdapterTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::ByteArrayAdapterTest );
-#include <decaf/internal/util/TimerTaskHeapTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::TimerTaskHeapTest );
-
-#include <decaf/internal/net/ssl/DefaultSSLSocketFactoryTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::ssl::DefaultSSLSocketFactoryTest );
-
-#include <decaf/internal/nio/ByteArrayBufferTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayBufferTest );
-#include <decaf/internal/nio/BufferFactoryTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::BufferFactoryTest );
-#include <decaf/internal/nio/CharArrayBufferTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::CharArrayBufferTest );
-#include <decaf/internal/nio/DoubleArrayBufferTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::DoubleArrayBufferTest );
-#include <decaf/internal/nio/FloatArrayBufferTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::FloatArrayBufferTest );
-#include <decaf/internal/nio/LongArrayBufferTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::LongArrayBufferTest );
-#include <decaf/internal/nio/IntArrayBufferTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::IntArrayBufferTest );
-#include <decaf/internal/nio/ShortArrayBufferTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ShortArrayBufferTest );
-
-#include <decaf/internal/net/URIEncoderDecoderTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIEncoderDecoderTest );
-#include <decaf/internal/net/URIHelperTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIHelperTest );
-
-#include <decaf/nio/BufferTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::nio::BufferTest );
-
-#include <decaf/io/InputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamTest );
-#include <decaf/io/OutputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamTest );
-#include <decaf/io/FilterInputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest );
-#include <decaf/io/FilterOutputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterOutputStreamTest );
-#include <decaf/io/BufferedInputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedInputStreamTest );
-#include <decaf/io/BufferedOutputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedOutputStreamTest );
-#include <decaf/io/ByteArrayInputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayInputStreamTest );
-#include <decaf/io/ByteArrayOutputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayOutputStreamTest );
-#include <decaf/io/PushbackInputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::PushbackInputStreamTest );
-#include <decaf/io/DataInputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataInputStreamTest );
-#include <decaf/io/DataOutputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataOutputStreamTest );
-#include <decaf/io/WriterTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::WriterTest );
-#include <decaf/io/ReaderTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ReaderTest );
-#include <decaf/io/OutputStreamWriterTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamWriterTest );
-#include <decaf/io/InputStreamReaderTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamReaderTest );
-
-#include <decaf/lang/MathTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::MathTest );
-#include <decaf/lang/ByteTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ByteTest );
-#include <decaf/lang/CharacterTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::CharacterTest );
-#include <decaf/lang/BooleanTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest );
-#include <decaf/lang/ShortTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ShortTest );
-#include <decaf/lang/IntegerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest );
-#include <decaf/lang/LongTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest );
-#include <decaf/lang/FloatTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::FloatTest );
-#include <decaf/lang/DoubleTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::DoubleTest );
-#include <decaf/lang/ExceptionTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ExceptionTest );
-#include <decaf/lang/ThreadTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ThreadTest );
-#include <decaf/lang/SystemTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::SystemTest );
-#include <decaf/lang/PointerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::PointerTest );
-#include <decaf/lang/ArrayPointerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ArrayPointerTest );
-#include <decaf/lang/StringTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::StringTest );
-
-#include <decaf/net/InetAddressTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::InetAddressTest );
-#include <decaf/net/Inet4AddressTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::InetAddressTest );
-#include <decaf/net/Inet6AddressTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::InetAddressTest );
-#include <decaf/net/SocketFactoryTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest );
-#include <decaf/net/ServerSocketTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::ServerSocketTest );
-#include <decaf/net/SocketTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest );
-#include <decaf/net/URITest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest );
-#include <decaf/net/URISyntaxExceptionTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest );
-#include <decaf/net/URLEncoderTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLEncoderTest );
-#include <decaf/net/URLDecoderTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLDecoderTest );
-
-#include <decaf/net/ssl/SSLSocketFactoryTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::ssl::SSLSocketFactoryTest );
-
-#include <decaf/util/concurrent/CopyOnWriteArrayListTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CopyOnWriteArrayListTest );
-#include <decaf/util/concurrent/CopyOnWriteArraySetTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CopyOnWriteArraySetTest );
-#include <decaf/util/concurrent/ConcurrentStlMapTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ConcurrentStlMapTest );
-#include <decaf/util/concurrent/CountDownLatchTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CountDownLatchTest );
-#include <decaf/util/concurrent/MutexTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::MutexTest );
-#include <decaf/util/concurrent/ThreadPoolExecutorTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ThreadPoolExecutorTest );
-#include <decaf/util/concurrent/ExecutorsTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ExecutorsTest );
-#include <decaf/util/concurrent/TimeUnitTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::TimeUnitTest );
-#include <decaf/util/concurrent/LinkedBlockingQueueTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::LinkedBlockingQueueTest );
-#include <decaf/util/concurrent/SemaphoreTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::SemaphoreTest );
-
-#include <decaf/util/concurrent/atomic/AtomicBooleanTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicBooleanTest );
-#include <decaf/util/concurrent/atomic/AtomicIntegerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicIntegerTest );
-#include <decaf/util/concurrent/atomic/AtomicReferenceTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicReferenceTest );
-
-#include <decaf/util/concurrent/locks/LockSupportTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::LockSupportTest );
-#include <decaf/util/concurrent/locks/AbstractQueuedSynchronizerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::AbstractQueuedSynchronizerTest );
-#include <decaf/util/concurrent/locks/ReentrantLockTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::ReentrantLockTest );
-
-#include <decaf/util/AbstractCollectionTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::AbstractCollectionTest );
-#include <decaf/util/AbstractListTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::AbstractListTest );
-#include <decaf/util/AbstractSequentialListTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::AbstractSequentialListTest );
-#include <decaf/util/DateTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::DateTest );
-#include <decaf/util/UUIDTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::UUIDTest );
-#include <decaf/util/ListTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ListTest );
-#include <decaf/util/LinkedListTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::LinkedListTest );
-#include <decaf/util/ArrayListTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ArrayListTest );
-#include <decaf/util/ArraysTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ArraysTest );
-#include <decaf/util/StlMapTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StlMapTest );
-#include <decaf/util/PropertiesTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PropertiesTest );
-#include <decaf/util/QueueTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::QueueTest );
-#include <decaf/util/RandomTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::RandomTest );
-#include <decaf/util/SetTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::SetTest );
-#include <decaf/util/StringTokenizerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest );
-#include <decaf/util/TimerTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::TimerTest );
-#include <decaf/util/PriorityQueueTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PriorityQueueTest );
-
-#include <decaf/util/zip/DeflaterTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterTest );
-#include <decaf/util/zip/InflaterTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterTest );
-#include <decaf/util/zip/Adler32Test.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::Adler32Test );
-#include <decaf/util/zip/CRC32Test.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CRC32Test );
-#include <decaf/util/zip/CheckedInputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedInputStreamTest );
-#include <decaf/util/zip/CheckedOutputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedOutputStreamTest );
-#include <decaf/util/zip/DeflaterOutputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterOutputStreamTest );
-#include <decaf/util/zip/InflaterInputStreamTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterInputStreamTest );
-
-#include <decaf/security/SecureRandomTest.h>
-CPPUNIT_TEST_SUITE_REGISTRATION( decaf::security::SecureRandomTest );
+//#include <activemq/commands/BrokerInfoTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerInfoTest );
+//#include <activemq/commands/BrokerIdTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerIdTest );
+//#include <activemq/commands/ActiveMQTopicTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTopicTest );
+//#include <activemq/commands/ActiveMQTextMessageTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTextMessageTest );
+//#include <activemq/commands/ActiveMQTempTopicTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempTopicTest );
+//#include <activemq/commands/ActiveMQTempQueueTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempQueueTest );
+//#include <activemq/commands/ActiveMQQueueTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQQueueTest );
+//#include <activemq/commands/ActiveMQMessageTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMessageTest );
+//#include <activemq/commands/ActiveMQMapMessageTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMapMessageTest );
+//#include <activemq/commands/ActiveMQDestinationTest2.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQDestinationTest );
+//#include <activemq/commands/ActiveMQBytesMessageTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQBytesMessageTest );
+//#include <activemq/commands/ActiveMQStreamMessageTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQStreamMessageTest );
+//#include <activemq/commands/XATransactionIdTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::XATransactionIdTest );
+//
+//#include <activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::BaseDataStreamMarshallerTest );
+//#include <activemq/wireformat/openwire/marshal/PrimitiveTypesMarshallerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::PrimitiveTypesMarshallerTest );
+//
+//#include <activemq/wireformat/openwire/utils/BooleanStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::BooleanStreamTest );
+//#include <activemq/wireformat/openwire/utils/HexTableTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::HexTableTest );
+//#include <activemq/wireformat/openwire/utils/MessagePropertyInterceptorTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::MessagePropertyInterceptorTest );
+//
+//#include <activemq/wireformat/openwire/OpenWireFormatTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::OpenWireFormatTest );
+//
+//#include <activemq/cmsutil/CmsAccessorTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsAccessorTest );
+//#include <activemq/cmsutil/CmsDestinationAccessorTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsDestinationAccessorTest );
+//#include <activemq/cmsutil/CmsTemplateTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsTemplateTest );
+//#include <activemq/cmsutil/DynamicDestinationResolverTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::DynamicDestinationResolverTest );
+//#include <activemq/cmsutil/SessionPoolTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::SessionPoolTest );
+//
+//#include <activemq/core/ActiveMQConnectionFactoryTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionFactoryTest );
+//#include <activemq/core/ActiveMQConnectionTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionTest );
+//#include <activemq/core/ActiveMQSessionTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQSessionTest );
+//#include <activemq/core/FifoMessageDispatchChannelTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::FifoMessageDispatchChannelTest );
+//#include <activemq/core/SimplePriorityMessageDispatchChannelTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::SimplePriorityMessageDispatchChannelTest );
+//
+//#include <activemq/state/ConnectionStateTrackerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTrackerTest );
+//#include <activemq/state/ConnectionStateTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTest );
+//#include <activemq/state/ConsumerStateTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConsumerStateTest );
+//#include <activemq/state/ProducerStateTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ProducerStateTest );
+//#include <activemq/state/SessionStateTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::SessionStateTest );
+//#include <activemq/state/TransactionStateTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::TransactionStateTest );
+//
+//#include <activemq/transport/failover/FailoverTransportTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::failover::FailoverTransportTest );
+//
+//#include <activemq/transport/correlator/ResponseCorrelatorTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::correlator::ResponseCorrelatorTest );
+//
+//#include <activemq/transport/mock/MockTransportFactoryTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::mock::MockTransportFactoryTest );
+//
+//#include <activemq/transport/inactivity/InactivityMonitorTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::inactivity::InactivityMonitorTest );
+//
+//#include <activemq/transport/TransportRegistryTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::TransportRegistryTest );
+//#include <activemq/transport/IOTransportTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::IOTransportTest );
+//
+//#include <activemq/exceptions/ActiveMQExceptionTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::exceptions::ActiveMQExceptionTest );
+//
+//#include <activemq/util/IdGeneratorTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::IdGeneratorTest );
+//#include <activemq/util/LongSequenceGeneratorTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::LongSequenceGeneratorTest );
+//#include <activemq/util/PrimitiveValueNodeTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueNodeTest );
+//#include <activemq/util/PrimitiveListTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveListTest );
+//#include <activemq/util/PrimitiveMapTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapTest );
+//#include <activemq/util/PrimitiveValueConverterTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueConverterTest );
+//#include <activemq/util/URISupportTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::URISupportTest );
+//#include <activemq/util/MemoryUsageTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MemoryUsageTest );
+//#include <activemq/util/MarshallingSupportTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MarshallingSupportTest );
+//
+//#include <activemq/threads/SchedulerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::SchedulerTest );
+//#include <activemq/threads/DedicatedTaskRunnerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::DedicatedTaskRunnerTest );
+//#include <activemq/threads/CompositeTaskRunnerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::CompositeTaskRunnerTest );
+//
+//#include <activemq/wireformat/WireFormatRegistryTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::WireFormatRegistryTest );
+//
+//#include <decaf/internal/util/ByteArrayAdapterTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::ByteArrayAdapterTest );
+//#include <decaf/internal/util/TimerTaskHeapTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::TimerTaskHeapTest );
+//
+//#include <decaf/internal/net/ssl/DefaultSSLSocketFactoryTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::ssl::DefaultSSLSocketFactoryTest );
+//
+//#include <decaf/internal/nio/ByteArrayBufferTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayBufferTest );
+//#include <decaf/internal/nio/BufferFactoryTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::BufferFactoryTest );
+//#include <decaf/internal/nio/CharArrayBufferTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::CharArrayBufferTest );
+//#include <decaf/internal/nio/DoubleArrayBufferTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::DoubleArrayBufferTest );
+//#include <decaf/internal/nio/FloatArrayBufferTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::FloatArrayBufferTest );
+//#include <decaf/internal/nio/LongArrayBufferTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::LongArrayBufferTest );
+//#include <decaf/internal/nio/IntArrayBufferTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::IntArrayBufferTest );
+//#include <decaf/internal/nio/ShortArrayBufferTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ShortArrayBufferTest );
+//
+//#include <decaf/internal/net/URIEncoderDecoderTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIEncoderDecoderTest );
+//#include <decaf/internal/net/URIHelperTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIHelperTest );
+//
+//#include <decaf/nio/BufferTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::nio::BufferTest );
+//
+//#include <decaf/io/InputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamTest );
+//#include <decaf/io/OutputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamTest );
+//#include <decaf/io/FilterInputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest );
+//#include <decaf/io/FilterOutputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterOutputStreamTest );
+//#include <decaf/io/BufferedInputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedInputStreamTest );
+//#include <decaf/io/BufferedOutputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedOutputStreamTest );
+//#include <decaf/io/ByteArrayInputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayInputStreamTest );
+//#include <decaf/io/ByteArrayOutputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayOutputStreamTest );
+//#include <decaf/io/PushbackInputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::PushbackInputStreamTest );
+//#include <decaf/io/DataInputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataInputStreamTest );
+//#include <decaf/io/DataOutputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataOutputStreamTest );
+//#include <decaf/io/WriterTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::WriterTest );
+//#include <decaf/io/ReaderTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ReaderTest );
+//#include <decaf/io/OutputStreamWriterTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamWriterTest );
+//#include <decaf/io/InputStreamReaderTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamReaderTest );
+//
+//#include <decaf/lang/MathTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::MathTest );
+//#include <decaf/lang/ByteTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ByteTest );
+//#include <decaf/lang/CharacterTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::CharacterTest );
+//#include <decaf/lang/BooleanTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest );
+//#include <decaf/lang/ShortTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ShortTest );
+//#include <decaf/lang/IntegerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest );
+//#include <decaf/lang/LongTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest );
+//#include <decaf/lang/FloatTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::FloatTest );
+//#include <decaf/lang/DoubleTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::DoubleTest );
+//#include <decaf/lang/ExceptionTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ExceptionTest );
+//#include <decaf/lang/ThreadTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ThreadTest );
+//#include <decaf/lang/SystemTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::SystemTest );
+//#include <decaf/lang/PointerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::PointerTest );
+//#include <decaf/lang/ArrayPointerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ArrayPointerTest );
+//#include <decaf/lang/StringTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::StringTest );
+//
+//#include <decaf/net/InetAddressTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::InetAddressTest );
+//#include <decaf/net/Inet4AddressTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::InetAddressTest );
+//#include <decaf/net/Inet6AddressTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::InetAddressTest );
+//#include <decaf/net/SocketFactoryTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest );
+//#include <decaf/net/ServerSocketTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::ServerSocketTest );
+//#include <decaf/net/SocketTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest );
+//#include <decaf/net/URITest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest );
+//#include <decaf/net/URISyntaxExceptionTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest );
+//#include <decaf/net/URLEncoderTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLEncoderTest );
+//#include <decaf/net/URLDecoderTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLDecoderTest );
+//
+//#include <decaf/net/ssl/SSLSocketFactoryTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::ssl::SSLSocketFactoryTest );
+//
+//#include <decaf/util/concurrent/CopyOnWriteArrayListTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CopyOnWriteArrayListTest );
+//#include <decaf/util/concurrent/CopyOnWriteArraySetTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CopyOnWriteArraySetTest );
+//#include <decaf/util/concurrent/ConcurrentStlMapTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ConcurrentStlMapTest );
+//#include <decaf/util/concurrent/CountDownLatchTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CountDownLatchTest );
+//#include <decaf/util/concurrent/MutexTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::MutexTest );
+//#include <decaf/util/concurrent/ThreadPoolExecutorTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ThreadPoolExecutorTest );
+//#include <decaf/util/concurrent/ExecutorsTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ExecutorsTest );
+//#include <decaf/util/concurrent/TimeUnitTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::TimeUnitTest );
+//#include <decaf/util/concurrent/LinkedBlockingQueueTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::LinkedBlockingQueueTest );
+//#include <decaf/util/concurrent/SemaphoreTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::SemaphoreTest );
+#include <decaf/util/concurrent/FutureTaskTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::FutureTaskTest );
+//
+//#include <decaf/util/concurrent/atomic/AtomicBooleanTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicBooleanTest );
+//#include <decaf/util/concurrent/atomic/AtomicIntegerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicIntegerTest );
+//#include <decaf/util/concurrent/atomic/AtomicReferenceTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicReferenceTest );
+//
+//#include <decaf/util/concurrent/locks/LockSupportTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::LockSupportTest );
+//#include <decaf/util/concurrent/locks/AbstractQueuedSynchronizerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::AbstractQueuedSynchronizerTest );
+//#include <decaf/util/concurrent/locks/ReentrantLockTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::ReentrantLockTest );
+//
+//#include <decaf/util/AbstractCollectionTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::AbstractCollectionTest );
+//#include <decaf/util/AbstractListTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::AbstractListTest );
+//#include <decaf/util/AbstractSequentialListTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::AbstractSequentialListTest );
+//#include <decaf/util/DateTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::DateTest );
+//#include <decaf/util/UUIDTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::UUIDTest );
+//#include <decaf/util/ListTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ListTest );
+//#include <decaf/util/LinkedListTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::LinkedListTest );
+//#include <decaf/util/ArrayListTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ArrayListTest );
+//#include <decaf/util/ArraysTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ArraysTest );
+//#include <decaf/util/StlMapTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StlMapTest );
+//#include <decaf/util/PropertiesTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PropertiesTest );
+//#include <decaf/util/QueueTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::QueueTest );
+//#include <decaf/util/RandomTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::RandomTest );
+//#include <decaf/util/SetTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::SetTest );
+//#include <decaf/util/StringTokenizerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest );
+//#include <decaf/util/TimerTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::TimerTest );
+//#include <decaf/util/PriorityQueueTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PriorityQueueTest );
+//
+//#include <decaf/util/zip/DeflaterTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterTest );
+//#include <decaf/util/zip/InflaterTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterTest );
+//#include <decaf/util/zip/Adler32Test.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::Adler32Test );
+//#include <decaf/util/zip/CRC32Test.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CRC32Test );
+//#include <decaf/util/zip/CheckedInputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedInputStreamTest );
+//#include <decaf/util/zip/CheckedOutputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedOutputStreamTest );
+//#include <decaf/util/zip/DeflaterOutputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterOutputStreamTest );
+//#include <decaf/util/zip/InflaterInputStreamTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterInputStreamTest );
+//
+//#include <decaf/security/SecureRandomTest.h>
+//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::security::SecureRandomTest );
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 //// Marshaler Tests



Mime
View raw message