1 /* This file is part of Metaproxy.
2 Copyright (C) 2005-2012 Index Data
4 Metaproxy is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include <metaproxy/package.hpp>
27 #include <boost/thread.hpp>
28 #include <boost/shared_ptr.hpp>
29 #define BOOST_AUTO_TEST_MAIN
30 #define BOOST_TEST_DYN_LINK
31 #include <boost/test/auto_unit_test.hpp>
34 #include <yaz/pquery.h>
35 #include <yaz/otherinfo.h>
36 using namespace boost::unit_test;
38 namespace mp = metaproxy_1;
40 namespace metaproxy_1 {
47 Wrap(const double &t) : m_t(t) { };
52 boost::mutex m_map_mutex;
54 void create(SesMap &sm, const mp::Session &s, double &t) {
55 boost::mutex::scoped_lock lock(m_map_mutex);
57 boost::shared_ptr<Wrap> w_ptr(new Wrap(t));
60 std::map<mp::Session,boost::shared_ptr<Wrap> >m_map_ptr;
65 BOOST_AUTO_TEST_CASE( test_ses_map_1 )
80 * c-file-style: "Stroustrup"
81 * indent-tabs-mode: nil
83 * vim: shiftwidth=4 tabstop=8 expandtab