In tests use BOOST_AUTO_UNIT_TEST instead of BOOST_AUTO_TEST_CASE
[metaproxy-moved-to-github.git] / src / test_package1.cpp
1 /* $Id: test_package1.cpp,v 1.4 2005-12-02 12:21:07 adam Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #include "config.hpp"
8 #include <iostream>
9 #include <stdexcept>
10
11 #include "package.hpp"
12
13 #define BOOST_AUTO_TEST_MAIN
14 #include <boost/test/auto_unit_test.hpp>
15
16 using namespace boost::unit_test;
17
18 BOOST_AUTO_UNIT_TEST( test_package1_1 )
19 {
20     try {
21         yp2::Package package1;
22
23         yp2::Origin origin;
24         yp2::Session session;
25         yp2::Package package2(package1.session(), origin);
26
27         BOOST_CHECK_EQUAL(package1.session().id(), package2.session().id());
28     }
29     catch ( ... ) {
30         BOOST_CHECK (false);
31     }
32 }
33
34 /*
35  * Local variables:
36  * c-basic-offset: 4
37  * indent-tabs-mode: nil
38  * c-file-style: "stroustrup"
39  * End:
40  * vim: shiftwidth=4 tabstop=8 expandtab
41  */