From 5be658a8817b8092a7b53b116f622412a5d0aef6 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 8 Nov 2006 17:07:44 +0000 Subject: More reorg to separate APR/posix code, work in progress. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@472545 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/test/unit/qpid/apr/APRBaseTest.cpp | 44 +++++++++++++++++++++++++++++++ cpp/test/unit/qpid/broker/MessageTest.cpp | 5 +--- cpp/test/unit/qpid/sys/APRBaseTest.cpp | 44 ------------------------------- 3 files changed, 45 insertions(+), 48 deletions(-) create mode 100644 cpp/test/unit/qpid/apr/APRBaseTest.cpp delete mode 100644 cpp/test/unit/qpid/sys/APRBaseTest.cpp (limited to 'cpp/test/unit') diff --git a/cpp/test/unit/qpid/apr/APRBaseTest.cpp b/cpp/test/unit/qpid/apr/APRBaseTest.cpp new file mode 100644 index 0000000000..a0f88f78db --- /dev/null +++ b/cpp/test/unit/qpid/apr/APRBaseTest.cpp @@ -0,0 +1,44 @@ +/* + * + * 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/apr/APRBase.h" +#include +#include + +using namespace qpid::sys; + +class APRBaseTest : public CppUnit::TestCase +{ + CPPUNIT_TEST_SUITE(APRBaseTest); + CPPUNIT_TEST(testMe); + CPPUNIT_TEST_SUITE_END(); + + public: + + void testMe() + { + APRBase::increment(); + APRBase::increment(); + APRBase::decrement(); + APRBase::decrement(); + } +}; + +// Make this test suite a plugin. +CPPUNIT_PLUGIN_IMPLEMENT(); +CPPUNIT_TEST_SUITE_REGISTRATION(APRBaseTest); + diff --git a/cpp/test/unit/qpid/broker/MessageTest.cpp b/cpp/test/unit/qpid/broker/MessageTest.cpp index 1dbbeda827..c0b9225483 100644 --- a/cpp/test/unit/qpid/broker/MessageTest.cpp +++ b/cpp/test/unit/qpid/broker/MessageTest.cpp @@ -15,14 +15,12 @@ * limitations under the License. * */ -#include "qpid/sys/APRBase.h" -#include "qpid/broker/Message.h" +#include #include #include using namespace qpid::broker; using namespace qpid::framing; -using namespace qpid::sys; class MessageTest : public CppUnit::TestCase { @@ -34,7 +32,6 @@ class MessageTest : public CppUnit::TestCase void testMe() { - APRBase::increment(); const int size(10); for(int i = 0; i < size; i++){ Message::shared_ptr msg = Message::shared_ptr(new Message(0, "A", "B", true, true)); diff --git a/cpp/test/unit/qpid/sys/APRBaseTest.cpp b/cpp/test/unit/qpid/sys/APRBaseTest.cpp deleted file mode 100644 index fc0c7dd9e1..0000000000 --- a/cpp/test/unit/qpid/sys/APRBaseTest.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * 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/sys/APRBase.h" -#include -#include - -using namespace qpid::sys; - -class APRBaseTest : public CppUnit::TestCase -{ - CPPUNIT_TEST_SUITE(APRBaseTest); - CPPUNIT_TEST(testMe); - CPPUNIT_TEST_SUITE_END(); - - public: - - void testMe() - { - APRBase::increment(); - APRBase::increment(); - APRBase::decrement(); - APRBase::decrement(); - } -}; - -// Make this test suite a plugin. -CPPUNIT_PLUGIN_IMPLEMENT(); -CPPUNIT_TEST_SUITE_REGISTRATION(APRBaseTest); - -- cgit v1.2.1