1 /* $Id: test_ses_map.cpp,v 1.7 2007-11-02 17:47:41 adam Exp $
2 Copyright (c) 2005-2007, Index Data.
4 This file is part of Metaproxy.
6 Metaproxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with Metaproxy; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
27 #include "session.hpp"
28 #include "package.hpp"
32 #include <boost/thread.hpp>
33 #include <boost/shared_ptr.hpp>
34 #define BOOST_AUTO_TEST_MAIN
35 #define BOOST_TEST_DYN_LINK
36 #include <boost/test/auto_unit_test.hpp>
39 #include <yaz/pquery.h>
40 #include <yaz/otherinfo.h>
41 using namespace boost::unit_test;
43 namespace mp = metaproxy_1;
45 namespace metaproxy_1 {
52 Wrap(const double &t) : m_t(t) { };
57 boost::mutex m_map_mutex;
59 void create(SesMap &sm, const mp::Session &s, double &t) {
60 boost::mutex::scoped_lock lock(m_map_mutex);
62 boost::shared_ptr<Wrap> w_ptr(new Wrap(t));
65 std::map<mp::Session,boost::shared_ptr<Wrap> >m_map_ptr;
70 BOOST_AUTO_TEST_CASE( test_ses_map_1 )
85 * indent-tabs-mode: nil
86 * c-file-style: "stroustrup"
88 * vim: shiftwidth=4 tabstop=8 expandtab