Author: aconway
Date: Wed Oct 31 17:38:58 2007
New Revision: 590869
URL: http://svn.apache.org/viewvc?rev=590869&view=rev
Log:
Preparation for session thread safety overhaul:
- simplified SessionState, responsibility for protocol states now in Handlers
- qpid::RefCounted, qpid::intrusive_ptr reference counting support.
- build boost unit tests as single exe, speeds up testing.
- fixed leak in AsynchIOAcceptor.cpp
Added:
incubator/qpid/trunk/qpid/cpp/src/qpid/RefCounted.h (with props)
incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp
incubator/qpid/trunk/qpid/cpp/src/tests/.valgrindrc
incubator/qpid/trunk/qpid/cpp/src/tests/RefCounted.cpp (with props)
incubator/qpid/trunk/qpid/cpp/src/tests/unit_test.cpp (with props)
Removed:
incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp-default
incubator/qpid/trunk/qpid/cpp/src/tests/.valgrindrc-default
incubator/qpid/trunk/qpid/cpp/src/tests/test_env
Modified:
incubator/qpid/trunk/qpid/cpp/src/Makefile.am
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/client/SessionCore.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.h
incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AtomicCount.h
incubator/qpid/trunk/qpid/cpp/src/tests/Blob.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/Cluster.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/Cpg.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/Frame.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am
incubator/qpid/trunk/qpid/cpp/src/tests/Serializer.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/Shlib.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/Url.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/Uuid.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/cluster_client.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/logging.cpp
incubator/qpid/trunk/qpid/cpp/src/tests/quick_perftest
incubator/qpid/trunk/qpid/cpp/src/tests/run_test
Modified: incubator/qpid/trunk/qpid/cpp/src/Makefile.am
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/Makefile.am?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/src/Makefile.am Wed Oct 31 17:38:58 2007
@@ -225,6 +225,7 @@
qpid/Msg.h \
qpid/Options.h \
qpid/Plugin.h \
+ qpid/RefCounted.h \
qpid/SharedObject.h \
qpid/Url.h \
qpid/memory.h \
Added: incubator/qpid/trunk/qpid/cpp/src/qpid/RefCounted.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/RefCounted.h?rev=590869&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/RefCounted.h (added)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/RefCounted.h Wed Oct 31 17:38:58 2007
@@ -0,0 +1,73 @@
+#ifndef QPID_REFCOUNTED_H
+#define QPID_REFCOUNTED_H
+
+/*
+ *
+ * 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 "qpid/sys/AtomicCount.h"
+
+#include <boost/intrusive_ptr.hpp>
+
+
+namespace qpid {
+
+/** Abstract interface for reference counted objects */
+class AbstractRefCounted {
+ public:
+ virtual void addRef() const=0;
+ virtual void release() const=0;
+ protected:
+ virtual ~AbstractRefCounted() {}
+};
+
+/**
+ * Reference-counted virtual base class.
+ */
+class RefCounted : public AbstractRefCounted
+{
+ public:
+ RefCounted() {}
+ virtual void addRef() const { ++count; }
+ virtual void release() const { if (--count==0) released(); }
+
+ protected:
+ virtual ~RefCounted() {};
+ // Copy/assign do not copy refcounts.
+ RefCounted(const RefCounted&) : AbstractRefCounted() {}
+ RefCounted& operator=(const RefCounted&) { return *this; }
+ virtual void released() const { delete this; }
+
+ private:
+ mutable sys::AtomicCount count;
+};
+
+using boost::intrusive_ptr;
+
+} // namespace qpid
+
+// intrusive_ptr support.
+namespace boost {
+void intrusive_ptr_add_ref(const qpid::AbstractRefCounted* p) { p->addRef(); }
+void intrusive_ptr_release(const qpid::AbstractRefCounted* p) { p->release(); }
+}
+
+
+#endif /*!QPID_REFCOUNTED_H*/
Propchange: incubator/qpid/trunk/qpid/cpp/src/qpid/RefCounted.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/qpid/trunk/qpid/cpp/src/qpid/RefCounted.h
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp Wed Oct 31
17:38:58 2007
@@ -38,8 +38,7 @@
connection(c), channel(ch, &c.getOutput()),
proxy(out), // Via my own handleOut() for L2 data.
peerSession(channel), // Direct to channel for L2 commands.
- ignoring(false),
- resuming(false) {}
+ ignoring(false) {}
SessionHandler::~SessionHandler() {}
@@ -117,8 +116,7 @@
assertClosed("resume");
session = connection.broker.getSessionManager().resume(id);
session->attach(*this);
- resuming=true;
- SequenceNumber seq = session->sendingAck();
+ SequenceNumber seq = session->resuming();
peerSession.attached(session->getId(), session->getTimeout());
proxy.getSession().ack(seq, SequenceNumberSet());
}
@@ -171,8 +169,7 @@
const SequenceNumberSet& /*seenFrameSet*/)
{
assertAttached("ack");
- if (resuming) {
- resuming=false;
+ if (session->getState() == SessionState::RESUMING) {
session->receivedAck(cumulativeSeenMark);
framing::SessionState::Replay replay=session->replay();
std::for_each(replay.begin(), replay.end(),
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.h Wed Oct 31
17:38:58 2007
@@ -94,7 +94,6 @@
framing::AMQP_ClientProxy proxy;
framing::AMQP_ClientProxy::Session peerSession;
bool ignoring;
- bool resuming;
std::auto_ptr<SessionState> session;
sys::Semaphore suspension;
};
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionManager.cpp Wed Oct 31
17:38:58 2007
@@ -56,6 +56,7 @@
void SessionManager::suspend(std::auto_ptr<SessionState> session) {
Mutex::ScopedLock l(lock);
active.erase(session->getId());
+ session->suspend();
session->expiry = AbsTime(now(),session->getTimeout()*TIME_SEC);
suspended.push_back(session.release()); // In expiry order
eraseExpired();
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/client/SessionCore.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/client/SessionCore.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/client/SessionCore.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/client/SessionCore.cpp Wed Oct 31
17:38:58 2007
@@ -52,6 +52,7 @@
break;
case RESUMING:
assert(session);
+ assert(session->getState() == SessionState::RESUMING);
assert(code==REPLY_SUCCESS);
assert(connection);
assert(channel.get());
@@ -142,6 +143,7 @@
if (state != CLOSED) {
invariant();
detach(code, text);
+ session->suspend();
setState(SUSPENDED);
}
}
@@ -200,7 +202,7 @@
if (state==OPEN)
doSuspend(REPLY_SUCCESS, OK);
check(state==SUSPENDED, COMMAND_INVALID, QPID_MSG("Session cannot be
resumed."));
- SequenceNumber sendAck=session->sendingAck();
+ SequenceNumber sendAck=session->resuming();
attaching(c);
proxy.resume(getId());
waitFor(OPEN);
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.cpp Wed Oct 31
17:38:58 2007
@@ -33,6 +33,7 @@
namespace framing {
SessionState::SessionState(uint32_t ack, const Uuid& uuid) :
+ state(ATTACHED),
id(uuid),
lastReceived(-1),
lastSent(-1),
@@ -44,6 +45,7 @@
{}
SessionState::SessionState(const Uuid& uuid) :
+ state(ATTACHED),
id(uuid),
lastReceived(-1),
lastSent(-1),
@@ -63,6 +65,10 @@
boost::optional<SequenceNumber> SessionState::received(const AMQFrame& f) {
if (isSessionCommand(f))
return boost::none;
+ if (state==RESUMING)
+ throw CommandInvalidException(
+ QPID_MSG("Invalid frame: Resuming session, expected session-ack"));
+ assert(state = ATTACHED);
++lastReceived;
QPID_LOG(trace, "Recv # "<< lastReceived << " " << id);
if (ackInterval && lastReceived == sendAckAt)
@@ -79,6 +85,7 @@
++lastSent;
QPID_LOG(trace, "Sent # "<< lastSent << " " << id);
return ackInterval &&
+ (state!=RESUMING) &&
(lastSent == solicitAckAt) &&
sendingSolicit();
}
@@ -90,6 +97,8 @@
}
void SessionState::receivedAck(SequenceNumber acked) {
+ if (state==RESUMING) state=ATTACHED;
+ assert(state==ATTACHED);
if (lastSent < acked)
throw InvalidArgumentException("Invalid sequence number in ack");
size_t keep = lastSent - acked;
@@ -104,10 +113,22 @@
}
bool SessionState::sendingSolicit() {
+ assert(state == ATTACHED);
if (ackSolicited)
return false;
solicitAckAt = lastSent + ackInterval;
return ackInterval != 0;
+}
+
+SequenceNumber SessionState::resuming() {
+ if (!resumable)
+ throw InternalErrorException("Session is not resumable");
+ state = RESUMING;
+ return sendingAck();
+}
+
+void SessionState::suspend() {
+ state = SUSPENDED;
}
}} // namespace qpid::framing
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.h?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SessionState.h Wed Oct 31
17:38:58 2007
@@ -35,10 +35,7 @@
/**
* Session state common to client and broker.
- *
- * Stores data needed to resume a session: replay frames, implements
- * session ack/resume protcools. Stores handler chains for the session,
- * handlers may themselves store state.
+ * Stores replay frames, implements session ack/resume protcools.
*
* A SessionState is always associated with an _open_ session (attached or
* suspended) it is destroyed when the session is closed.
@@ -49,6 +46,13 @@
public:
typedef std::vector<AMQFrame> Replay;
+ /** States of a session. */
+ enum State {
+ SUSPENDED, ///< Suspended, detached from any channel.
+ RESUMING, ///< Resuming: waiting for initial ack from peer.
+ ATTACHED ///< Attached to channel and operating normally.
+ };
+
/**
*Create a newly opened active session.
[EMAIL PROTECTED] ackInterval send/solicit an ack whenever N unacked
frames
@@ -56,8 +60,7 @@
*
* N=0 disables voluntary send/solict ack.
*/
- SessionState(uint32_t ackInterval,
- const framing::Uuid& id=framing::Uuid(true));
+ SessionState(uint32_t ackInterval, const framing::Uuid&
id=framing::Uuid(true));
/**
* Create a non-resumable session. Does not store session frames,
@@ -66,6 +69,7 @@
SessionState(const framing::Uuid& id=framing::Uuid(true));
const framing::Uuid& getId() const { return id; }
+ State getState() const { return state; }
/** Received incoming L3 frame.
* @return SequenceNumber if an ack should be sent, empty otherwise.
@@ -88,6 +92,13 @@
*/
Replay replay();
+ /** Suspend the session. */
+ void suspend();
+
+ /** Start resume protocol for the session.
+ [EMAIL PROTECTED] sequence number to ack immediately. */
+ SequenceNumber resuming();
+
/** About to send an unscheduled ack, e.g. to respond to a solicit-ack.
*
* Note: when received() returns a sequence number this function
@@ -104,7 +115,9 @@
bool sendingSolicit();
+ State state;
framing::Uuid id;
+
Unacked unackedOut;
SequenceNumber lastReceived;
SequenceNumber lastSent;
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp Wed Oct 31
17:38:58 2007
@@ -173,7 +173,7 @@
d.run();
// Now wait for n-1 io threads to exit
- for (int i=0; i>numIOThreads-1; ++i) {
+ for (int i=0; i<numIOThreads-1; ++i) {
t[i].join();
}
}
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AtomicCount.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AtomicCount.h?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AtomicCount.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AtomicCount.h Wed Oct 31
17:38:58 2007
@@ -28,7 +28,7 @@
/**
* Atomic counter.
*/
-class AtomicCount : boost::noncopyable {
+class AtomicCount {
public:
typedef ScopedDecrement<AtomicCount> ScopedDecrement;
typedef ScopedIncrement<AtomicCount> ScopedIncrement;
Added: incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp?rev=590869&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp (added)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/.valgrind.supp Wed Oct 31 17:38:58
2007
@@ -0,0 +1,53 @@
+{
+ Benign error in libcpg.
+
+ Memcheck:Param
+ socketcall.sendmsg(msg.msg_iov[i])
+ obj:*/libpthread-2.5.so
+ obj:*/libcpg.so.2.0.0
+}
+
+{
+ Uninitialised value problem in dlopen
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:*dl_*
+ obj:/lib64/ld-2.6.so
+ obj:*
+}
+{
+ False "possibly leaked" in boost program_options - global std::string var.
+ Memcheck:Leak
+ fun:_Znwj
+ fun:_ZNSs4_Rep9_S_createEjjRKSaIcE
+ obj:/usr/lib/libstdc++.so.6.0.8
+ fun:_ZNSsC1EPKcRKSaIcE
+ obj:/usr/lib/libboost_program_options.so.1.33.1
+}
+#
+# Bogus uninit bytes error: only occur on i386.
+#
+{
+ Syscall param epoll_ctl(event) points to uninitialised byte(s)
+ Memcheck:Param
+ epoll_ctl(event)
+ fun:epoll_ctl
+}
+{
+ Bogus error appearing on Fedora 7.
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:dl_main
+ fun:_dl_sysdep_start
+ fun:_dl_start
+ obj:/lib/ld-2.6.so
+}
+
+{
+ Bogus error appearing on Fedora 7.
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+}
Added: incubator/qpid/trunk/qpid/cpp/src/tests/.valgrindrc
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/.valgrindrc?rev=590869&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/.valgrindrc (added)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/.valgrindrc Wed Oct 31 17:38:58 2007
@@ -0,0 +1,7 @@
+--gen-suppressions=all
+--leak-check=full
+--demangle=yes
+--suppressions=.valgrind.supp
+--num-callers=25
+--trace-children=yes
+
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Blob.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Blob.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Blob.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Blob.cpp Wed Oct 31 17:38:58 2007
@@ -18,9 +18,10 @@
*/
#include "qpid/framing/Blob.h"
-#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(Blob);
+
using namespace std;
using namespace qpid::framing;
@@ -123,3 +124,5 @@
BOOST_CHECK(b.empty());
BOOST_CHECK_EQUAL(0, Foo::instances);
}
+
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Cluster.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Cluster.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Cluster.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Cluster.cpp Wed Oct 31 17:38:58 2007
@@ -24,8 +24,8 @@
#include "qpid/framing/all_method_bodies.h"
#include "qpid/cluster/ClassifierHandler.h"
-#define BOOST_AUTO_TEST_MAIN // Must come before #include<boost/test/*>
#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(Cluster);
#include <sys/wait.h>
@@ -104,5 +104,5 @@
BOOST_CHECK_EQUAL(1u, wiring.count);
BOOST_CHECK_EQUAL(1u, other.count);
}
-
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Cpg.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Cpg.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Cpg.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Cpg.cpp Wed Oct 31 17:38:58 2007
@@ -16,12 +16,15 @@
*
*/
-#define BOOST_AUTO_TEST_MAIN // Must come before #include<boost/test/*>
-#include <boost/test/auto_unit_test.hpp>
+
#include "test_tools.h"
#include "qpid/cluster/Cpg.h"
#include "qpid/framing/AMQBody.h"
+
#include <boost/bind.hpp>
+#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(Cpg);
+
#include <string>
#include <iostream>
#include <iterator>
@@ -102,3 +105,5 @@
BOOST_CHECK_EQUAL(0, cb.configChanges[1]);
}
+
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp Wed Oct 31 17:38:58
2007
@@ -22,8 +22,8 @@
#include "qpid/framing/FieldTable.h"
#include "qpid/framing/FieldValue.h"
-#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(FieldTable);
using namespace qpid::framing;
@@ -80,5 +80,4 @@
BOOST_CHECK(IntegerValue(1234) == *d.get("B"));
}
-
-
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp Wed Oct 31 17:38:58
2007
@@ -18,8 +18,8 @@
*/
#include "qpid/framing/FieldValue.h"
-#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(FieldValue);
using namespace qpid::framing;
@@ -86,3 +86,4 @@
}
#endif
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Frame.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Frame.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Frame.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Frame.cpp Wed Oct 31 17:38:58 2007
@@ -20,9 +20,9 @@
*/
#include "qpid/framing/Frame.h"
-#define BOOST_AUTO_TEST_MAIN // Must come before #include<boost/test/*>
-#include <boost/test/auto_unit_test.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(Frame);
using namespace std;
using namespace qpid::framing;
@@ -75,3 +75,5 @@
BOOST_REQUIRE(dynamic_cast<AccessRequestOkBody*>(g.getBody())->getTicket() ==
42);
}
}
+
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am Wed Oct 31 17:38:58 2007
@@ -17,63 +17,24 @@
CLEANFILES=
#
-# Unit test programs.
+# Unit test program
+#
+# Unit tests are built as a single program to reduce valgrind overhead
+# when running the tests. If you want to build a subset of the tests do
+# rm unit_test; make unit_test unit_test_SOURCES="SelectedTest.cpp"
#
-TESTS+=SessionState
-check_PROGRAMS+=SessionState
-SessionState_SOURCES=SessionState.cpp
-SessionState_LDADD=-lboost_unit_test_framework $(lib_common)
-
-TESTS+=Blob
-check_PROGRAMS+=Blob
-Blob_SOURCES=Blob.cpp
-Blob_LDADD=-lboost_unit_test_framework $(lib_common)
-
-TESTS+=logging
-check_PROGRAMS+=logging
-logging_SOURCES=logging.cpp test_tools.h
-logging_LDADD=-lboost_unit_test_framework -lboost_regex $(lib_common)
-
-TESTS+=Url
-check_PROGRAMS+=Url
-Url_SOURCES=Url.cpp test_tools.h
-Url_LDADD=-lboost_unit_test_framework $(lib_common)
-
-TESTS+=Uuid
-check_PROGRAMS+=Uuid
-Uuid_SOURCES=Uuid.cpp test_tools.h
-Uuid_LDADD=-lboost_unit_test_framework $(lib_common)
+TESTS+=unit_test
+check_PROGRAMS+=unit_test
+unit_test_LDADD=-lboost_unit_test_framework -lboost_regex $(lib_common)
+unit_test_SOURCES= unit_test.cpp \
+ RefCounted.cpp SessionState.cpp Blob.cpp logging.cpp Url.cpp Uuid.cpp \
+ Shlib.cpp FieldValue.cpp FieldTable.cpp
check_LTLIBRARIES += libshlibtest.la
libshlibtest_la_LDFLAGS = -module -rpath $(abs_builddir)
libshlibtest_la_SOURCES = shlibtest.cpp
-TESTS+=Shlib
-check_PROGRAMS+=Shlib
-Shlib_SOURCES=Shlib.cpp
-Shlib_LDADD=-lboost_unit_test_framework $(lib_common)
-
-TESTS+=FieldValue
-check_PROGRAMS+=FieldValue
-FieldValue_SOURCES=FieldValue.cpp
-FieldValue_LDADD=-lboost_unit_test_framework $(lib_common)
-
-TESTS+=FieldTable
-check_PROGRAMS+=FieldTable
-FieldTable_SOURCES=FieldTable.cpp
-FieldTable_LDADD=-lboost_unit_test_framework $(lib_common)
-
-# TODO aconway 2007-08-07: Why aren't these tests run automatically?
-
-check_PROGRAMS+=ConcurrentQueue
-ConcurrentQueue_SOURCES=ConcurrentQueue.cpp
-ConcurrentQueue_LDADD=-lboost_test_exec_monitor $(lib_common)
-
-check_PROGRAMS+=Serializer
-Serializer_SOURCES=Serializer.cpp
-Serializer_LDADD=-lboost_unit_test_framework $(lib_common)
-
include cluster.mk
#
@@ -135,21 +96,21 @@
check_PROGRAMS += $(testprogs) interop_runner
-TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir) $(srcdir)/run_test
+TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir)
BOOST_TEST_SHOW_PROGRESS=yes $(srcdir)/run_test
system_tests = client_test exception_test quick_perftest quick_topictest
TESTS += run-unit-tests start_broker $(system_tests) python_tests stop_broker
EXTRA_DIST += \
- test_env run_test vg_check \
+ run_test vg_check \
run-unit-tests start_broker python_tests stop_broker
\
quick_topictest \
quick_perftest \
topictest \
- .valgrind.supp-default \
- .valgrindrc-default \
+ .valgrind.supp \
+ .valgrindrc \
InProcessBroker.h \
- MessageUtils.h
\
+ MessageUtils.h \
MockChannel.h
\
MockConnectionInputHandler.h \
TxMocks.h \
@@ -182,16 +143,7 @@
check-unit:
$(MAKE) check TESTS=$(UNIT_TESTS) run-unit-tests
-# Make sure valgrind files are generated.
-all-am: .valgrind.supp .valgrindrc
-
-# Create a copy so that can be modified without risk of committing the changes.
-.valgrindrc: .valgrindrc-default
- cp $^ $@
-.valgrind.supp: .valgrind.supp-default
- cp $^ $@
-
-CLEANFILES+=valgrind.out *.log *.vglog .valgrindrc .valgrind.supp dummy_test
$(unit_wrappers)
+CLEANFILES+=valgrind.out *.log *.vglog dummy_test $(unit_wrappers)
MAINTAINERCLEANFILES=gen.mk
interop_runner_SOURCES = \
Added: incubator/qpid/trunk/qpid/cpp/src/tests/RefCounted.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/RefCounted.cpp?rev=590869&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/RefCounted.cpp (added)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/RefCounted.cpp Wed Oct 31 17:38:58
2007
@@ -0,0 +1,72 @@
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed 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 "qpid/RefCounted.h"
+
+#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(RefCounted);
+
+using namespace std;
+using namespace qpid;
+
+struct DummyCounted : public AbstractRefCounted {
+ DummyCounted() : count(0) {}
+ mutable int count;
+ virtual void addRef() const { count++; }
+ virtual void release() const { count--; }
+};
+
+BOOST_AUTO_TEST_CASE(testIntrusivePtr) {
+ DummyCounted dummy;
+ BOOST_CHECK_EQUAL(0, dummy.count);
+ {
+ intrusive_ptr<DummyCounted> p(&dummy);
+ BOOST_CHECK_EQUAL(1, dummy.count);
+ {
+ intrusive_ptr<DummyCounted> q(p);
+ BOOST_CHECK_EQUAL(2, dummy.count);
+ intrusive_ptr<DummyCounted> r;
+ r=q;
+ BOOST_CHECK_EQUAL(3, dummy.count);
+ }
+ BOOST_CHECK_EQUAL(1, dummy.count);
+ }
+ BOOST_CHECK_EQUAL(0, dummy.count);
+}
+
+struct CountMe : public RefCounted {
+ static int instances;
+ CountMe() { ++instances; }
+ ~CountMe() { --instances; }
+};
+
+int CountMe::instances=0;
+
+BOOST_AUTO_TEST_CASE(testRefCounted) {
+ BOOST_CHECK_EQUAL(0, CountMe::instances);
+ intrusive_ptr<CountMe> p(new CountMe());
+ BOOST_CHECK_EQUAL(1, CountMe::instances);
+ intrusive_ptr<CountMe> q(p);
+ BOOST_CHECK_EQUAL(1, CountMe::instances);
+ q=0;
+ BOOST_CHECK_EQUAL(1, CountMe::instances);
+ p=0;
+ BOOST_CHECK_EQUAL(0, CountMe::instances);
+}
+
+BOOST_AUTO_TEST_SUITE_END();
Propchange: incubator/qpid/trunk/qpid/cpp/src/tests/RefCounted.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/qpid/trunk/qpid/cpp/src/tests/RefCounted.cpp
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Serializer.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Serializer.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Serializer.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Serializer.cpp Wed Oct 31 17:38:58
2007
@@ -24,10 +24,10 @@
#include "qpid/sys/Mutex.h"
#include "qpid/sys/Serializer.h"
-#define BOOST_AUTO_TEST_MAIN
-#include <boost/test/auto_unit_test.hpp>
#include <boost/bind.hpp>
#include <boost/utility/value_init.hpp>
+#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(Serializer);
#include <set>
@@ -151,3 +151,5 @@
BOOST_CHECK_EQUAL(100u, tester.count);
BOOST_CHECK(Thread::logId() != *tester.threads.begin());
}
+
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/SessionState.cpp Wed Oct 31
17:38:58 2007
@@ -18,9 +18,9 @@
#include "qpid/framing/SessionState.h"
-#define BOOST_AUTO_TEST_MAIN
-#include <boost/test/auto_unit_test.hpp>
#include <boost/bind.hpp>
+#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(SessionState);
using namespace std;
using namespace qpid::framing;
@@ -97,16 +97,21 @@
// Replay of all frames.
SessionState session(100);
sent(session, "abc");
+ session.suspend(); session.resuming();
session.receivedAck(-1);
BOOST_CHECK_EQUAL(replayChars(session.replay()), "abc");
// Replay with acks
session.receivedAck(0); // ack a.
+ session.suspend();
+ session.resuming();
session.receivedAck(1); // ack b.
BOOST_CHECK_EQUAL(replayChars(session.replay()), "c");
// Replay after further frames.
sent(session, "def");
+ session.suspend();
+ session.resuming();
session.receivedAck(3);
BOOST_CHECK_EQUAL(replayChars(session.replay()), "ef");
@@ -135,3 +140,5 @@
BOOST_CHECK(!s3.received(f));
BOOST_CHECK_EQUAL(5u, *s3.received(f));
}
+
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Shlib.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Shlib.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Shlib.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Shlib.cpp Wed Oct 31 17:38:58 2007
@@ -22,8 +22,8 @@
#include "qpid/sys/Shlib.h"
#include "qpid/Exception.h"
-#define BOOST_AUTO_TEST_MAIN // Must come before #include<boost/test/*>
#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(Shlib);
using namespace qpid::sys;
typedef void (*CallMe)(int*);
@@ -55,3 +55,5 @@
BOOST_CHECK_EQUAL(42, unloaded);
}
+
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Url.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Url.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Url.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Url.cpp Wed Oct 31 17:38:58 2007
@@ -16,7 +16,7 @@
*
*/
-#define BOOST_AUTO_TEST_MAIN // Must come before #include<boost/test/*>
+
#include <boost/test/auto_unit_test.hpp>
#include "test_tools.h"
#include "qpid/Url.h"
@@ -26,6 +26,8 @@
using namespace qpid;
using namespace boost::assign;
+BOOST_AUTO_TEST_SUITE(Url);
+
BOOST_AUTO_TEST_CASE(testUrl_str) {
Url url;
url.push_back(TcpAddress("foo.com"));
@@ -59,4 +61,4 @@
}
-
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Uuid.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Uuid.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Uuid.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Uuid.cpp Wed Oct 31 17:38:58 2007
@@ -19,8 +19,8 @@
#include "qpid/framing/Uuid.h"
#include "qpid/framing/Buffer.h"
-#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(Uuid);
#include <set>
@@ -73,3 +73,5 @@
BOOST_CHECK_EQUAL(string(sample.begin(), sample.end()),
string(decoded.begin(), decoded.end()));
}
+
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/cluster_client.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/cluster_client.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/cluster_client.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/cluster_client.cpp Wed Oct 31
17:38:58 2007
@@ -19,13 +19,14 @@
#include "qpid/client/Connection.h"
#include "qpid/shared_ptr.h"
-#define BOOST_AUTO_TEST_MAIN // Must come before #include<boost/test/*>
#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(cluster_client);
#include <fstream>
#include <vector>
#include <functional>
+
using namespace std;
using namespace qpid;
using namespace qpid::client;
@@ -77,6 +78,4 @@
}
}
-
-
-
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/logging.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/logging.cpp?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/logging.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/logging.cpp Wed Oct 31 17:38:58 2007
@@ -16,18 +16,21 @@
*
*/
-#define BOOST_AUTO_TEST_MAIN // Must come before #include<boost/test/*>
-#include <boost/test/auto_unit_test.hpp>
+
#include "test_tools.h"
#include "qpid/log/Logger.h"
#include "qpid/log/Options.h"
#include "qpid/memory.h"
#include "qpid/Options.h"
+
#include <boost/test/floating_point_comparison.hpp>
#include <boost/format.hpp>
+#include <boost/test/auto_unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(logging);
+
#include <exception>
-#include <time.h>
#include <fstream>
+#include <time.h>
using namespace std;
@@ -366,3 +369,5 @@
log.close();
unlink("logging.tmp");
}
+
+BOOST_AUTO_TEST_SUITE_END();
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/quick_perftest
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/quick_perftest?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/quick_perftest (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/quick_perftest Wed Oct 31 17:38:58
2007
@@ -1,2 +1,2 @@
#!/bin/sh
-exec `dirname $0`/test_env ./perftest --listen --publish --count 1000
+exec `dirname $0`/run_test ./perftest --listen --publish --count 1000
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/run_test
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/run_test?rev=590869&r1=590868&r2=590869&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/run_test (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/run_test Wed Oct 31 17:38:58 2007
@@ -21,18 +21,20 @@
# Export QPID_PORT if qpidd.port exists.
test -f qpidd.port && export QPID_PORT=`cat qpidd.port`
+# Avoid silly libtool error messages if these are not defined
+test -z "$LC_ALL" && export LC_ALL=
+test -z "$LC_CTYPE" && export LC_CTYPE=
+test -z "$LC_COLLATE" && export LC_COLLATE=
+test -z "$LC_MESSAGES" && export LC_MESSAGES=
+
VG_LOG="$1.vglog"
-TEST_LOG="$1.log"
-rm -f $VG_LOG $TEST_LOG
+rm -f $VG_LOG
if grep -l "^# Generated by .*libtool" "$1" >/dev/null 2>&1; then
# This is a libtool "executable". Valgrind it if VALGRIND specified.
test -n "$VALGRIND" && VALGRIND="$VALGRIND --log-file-exactly=$VG_LOG --"
# Hide output unless there's an error.
- libtool --mode=execute $VALGRIND "$@" >$TEST_LOG 2>&1 || {
- ERROR=$?
- cat $TEST_LOG
- }
+ libtool --mode=execute $VALGRIND "$@" 2>&1 || ERROR=$?
test -n "$VALGRIND" && vg_check
else
# This is a non-libtool shell script, just execute it.
@@ -42,7 +44,7 @@
if test -z "$ERROR"; then
# Clean up logs if there was no error.
- rm -f $VG_LOG $TEST_LOG
+ rm -f $VG_LOG
exit 0
else
exit $ERROR
Added: incubator/qpid/trunk/qpid/cpp/src/tests/unit_test.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/unit_test.cpp?rev=590869&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/unit_test.cpp (added)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/unit_test.cpp Wed Oct 31 17:38:58
2007
@@ -0,0 +1,22 @@
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ *
+ */
+
+#define BOOST_AUTO_TEST_MAIN // Must come before #include<boost/test/*>
+#include <boost/test/auto_unit_test.hpp>
+
+// Defines test_main function to link with actual unit test code.
Propchange: incubator/qpid/trunk/qpid/cpp/src/tests/unit_test.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/qpid/trunk/qpid/cpp/src/tests/unit_test.cpp
------------------------------------------------------------------------------
svn:keywords = Rev Date