From 614429c1f7eb3f66e6100352dce77ddfa31a6d58 Mon Sep 17 00:00:00 2001 From: Marc Cromme Date: Thu, 28 Sep 2006 11:56:54 +0000 Subject: [PATCH] cleaning code, changed Class name Backend_test to BackendTest to adher to naming conventions --- src/filter_backend_test.cpp | 16 ++++++++-------- src/filter_backend_test.hpp | 8 ++++---- src/test_filter_backend_test.cpp | 10 +++++----- src/test_filter_sru_to_z3950.cpp | 36 +++++++++++++++++------------------- src/test_filter_virt_db.cpp | 4 ++-- 5 files changed, 36 insertions(+), 38 deletions(-) diff --git a/src/filter_backend_test.cpp b/src/filter_backend_test.cpp index 90feab8..e7d222f 100644 --- a/src/filter_backend_test.cpp +++ b/src/filter_backend_test.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_backend_test.cpp,v 1.19 2006-06-10 14:29:12 adam Exp $ +/* $Id: filter_backend_test.cpp,v 1.20 2006-09-28 11:56:54 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -32,8 +32,8 @@ namespace metaproxy_1 { class Session_info { int dummy; }; - class Backend_test::Rep { - friend class Backend_test; + class BackendTest::Rep { + friend class BackendTest; Z_Records *fetch( ODR odr, Odr_oid *preferredRecordSyntax, @@ -77,14 +77,14 @@ static const char *marc_record = "\x20\x20\x20\x31\x31\x32\x32\x34\x34\x36\x36\x20\x1E\x1D"; -yf::Backend_test::Backend_test() : m_p(new Backend_test::Rep) { +yf::BackendTest::BackendTest() : m_p(new BackendTest::Rep) { m_p->m_support_named_result_sets = false; } -yf::Backend_test::~Backend_test() { +yf::BackendTest::~BackendTest() { } -Z_Records *yf::Backend_test::Rep::fetch( +Z_Records *yf::BackendTest::Rep::fetch( ODR odr, Odr_oid *preferredRecordSyntax, int start, int number, int &error_code, std::string &addinfo, int *number_returned, int *next_position) @@ -144,7 +144,7 @@ Z_Records *yf::Backend_test::Rep::fetch( return rec; } -void yf::Backend_test::process(Package &package) const +void yf::BackendTest::process(Package &package) const { Z_GDU *gdu = package.request().get(); @@ -298,7 +298,7 @@ void yf::Backend_test::process(Package &package) const static mp::filter::Base* filter_creator() { - return new mp::filter::Backend_test; + return new mp::filter::BackendTest; } extern "C" { diff --git a/src/filter_backend_test.hpp b/src/filter_backend_test.hpp index 239f34a..088a43d 100644 --- a/src/filter_backend_test.hpp +++ b/src/filter_backend_test.hpp @@ -1,4 +1,4 @@ -/* $Id: filter_backend_test.hpp,v 1.9 2006-06-10 14:29:12 adam Exp $ +/* $Id: filter_backend_test.hpp,v 1.10 2006-09-28 11:56:54 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -13,11 +13,11 @@ namespace metaproxy_1 { namespace filter { - class Backend_test : public Base { + class BackendTest : public Base { class Rep; public: - ~Backend_test(); - Backend_test(); + ~BackendTest(); + BackendTest(); void process(metaproxy_1::Package & package) const; private: boost::scoped_ptr m_p; diff --git a/src/test_filter_backend_test.cpp b/src/test_filter_backend_test.cpp index c3719c3..f2a7965 100644 --- a/src/test_filter_backend_test.cpp +++ b/src/test_filter_backend_test.cpp @@ -1,4 +1,4 @@ -/* $Id: test_filter_backend_test.cpp,v 1.8 2006-06-10 14:29:12 adam Exp $ +/* $Id: test_filter_backend_test.cpp,v 1.9 2006-09-28 11:56:54 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -30,7 +30,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_backend_test_1 ) { try { - mp::filter::Backend_test btest; + mp::filter::BackendTest btest; } catch ( ... ) { BOOST_CHECK (false); @@ -43,7 +43,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_backend_test_2 ) { mp::RouterChain router; - mp::filter::Backend_test btest; + mp::filter::BackendTest btest; router.append(btest); mp::Package pack; @@ -81,7 +81,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_backend_test_3 ) { mp::RouterChain router; - mp::filter::Backend_test btest; + mp::filter::BackendTest btest; router.append(btest); mp::Package pack; @@ -128,7 +128,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_backend_test_4 ) { mp::RouterChain router; - mp::filter::Backend_test btest; + mp::filter::BackendTest btest; router.append(btest); mp::Package pack; diff --git a/src/test_filter_sru_to_z3950.cpp b/src/test_filter_sru_to_z3950.cpp index 2c9b505..a6ce25f 100644 --- a/src/test_filter_sru_to_z3950.cpp +++ b/src/test_filter_sru_to_z3950.cpp @@ -1,4 +1,4 @@ -/* $Id: test_filter_sru_to_z3950.cpp,v 1.1 2006-09-28 10:38:00 marc Exp $ +/* $Id: test_filter_sru_to_z3950.cpp,v 1.2 2006-09-28 11:56:54 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -36,28 +36,26 @@ BOOST_AUTO_UNIT_TEST( test_filter_sru_to_z3950_1 ) } } -// BOOST_AUTO_UNIT_TEST( test_filter_sru_to_z3950_2 ) -// { -// try -// { -// mp::RouterChain router; +BOOST_AUTO_UNIT_TEST( test_filter_sru_to_z3950_2 ) +{ + try + { + mp::RouterChain router; -// mp::filter::SRUtoZ3950 f_sru_to_z3950; -// //FilterBounceZ3950 f_bounce_z3950; + mp::filter::SRUtoZ3950 f_sru_to_z3950; -// router.append(f_sru_to_z3950); -// //router.append(f_bounce_z3950); + router.append(f_sru_to_z3950); -// check_sru_to_z3950_init(router); -// check_sru_to_z3950_search(router, -// "@attrset Bib-1 @attr 1=4 the", -// "@attrset Bib-1 @attr 1=4 the"); + //check_sru_to_z3950_init(router); + //check_sru_to_z3950_search(router, + // "@attrset Bib-1 @attr 1=4 the", + // "@attrset Bib-1 @attr 1=4 the"); -// } -// catch ( ... ) { -// BOOST_CHECK (false); -// } -// } + } + catch ( ... ) { + BOOST_CHECK (false); + } +} // BOOST_AUTO_UNIT_TEST( test_filter_sru_to_z3950_3 ) diff --git a/src/test_filter_virt_db.cpp b/src/test_filter_virt_db.cpp index f61f8a2..a3cef92 100644 --- a/src/test_filter_virt_db.cpp +++ b/src/test_filter_virt_db.cpp @@ -1,4 +1,4 @@ -/* $Id: test_filter_virt_db.cpp,v 1.13 2006-06-10 14:29:12 adam Exp $ +/* $Id: test_filter_virt_db.cpp,v 1.14 2006-09-28 11:56:54 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -208,7 +208,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_virt_db_3 ) #if 0 router.append(filter_log2); #endif - mp::filter::Backend_test btest; + mp::filter::BackendTest btest; router.append(btest); mp::Session session1; -- 1.7.10.4