• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2007 Joseph Gauterin
2 //
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #include <boost/utility/swap.hpp>
8 #include <boost/core/lightweight_test.hpp>
9 #define BOOST_CHECK BOOST_TEST
10 #define BOOST_CHECK_EQUAL BOOST_TEST_EQ
11 
main()12 int main()
13 {
14   int object1 = 1;
15   int object2 = 2;
16 
17   boost::swap(object1,object2);
18 
19   BOOST_CHECK_EQUAL(object1,2);
20   BOOST_CHECK_EQUAL(object2,1);
21 
22   return boost::report_errors();
23 }
24 
25