Boost logo

Boost-Commit :

From: joseph.gauterin_at_[hidden]
Date: 2008-07-19 15:40:13


Author: joseph.gauterin
Date: 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
New Revision: 47607
URL: http://svn.boost.org/trac/boost/changeset/47607

Log:
Corrected duplicated file contents
Text files modified:
   trunk/libs/utility/swap/test/lib_header_1.cpp | 11 ----
   trunk/libs/utility/swap/test/lib_header_2.cpp | 9 ---
   trunk/libs/utility/swap/test/mixed_headers_1.cpp | 9 ---
   trunk/libs/utility/swap/test/mixed_headers_2.cpp | 8 ---
   trunk/libs/utility/swap/test/primitive.cpp | 21 ---------
   trunk/libs/utility/swap/test/root_header_1.cpp | 8 ---
   trunk/libs/utility/swap/test/root_header_2.cpp | 9 ---
   trunk/libs/utility/swap/test/specialized_in_boost.cpp | 35 ---------------
   trunk/libs/utility/swap/test/specialized_in_global.cpp | 29 ------------
   trunk/libs/utility/swap/test/specialized_in_other.cpp | 35 ---------------
   trunk/libs/utility/swap/test/specialized_in_std.cpp | 34 --------------
   trunk/libs/utility/swap/test/swap_arrays.cpp | 38 ----------------
   trunk/libs/utility/swap/test/swap_test_class.hpp | 91 ---------------------------------------
   13 files changed, 3 insertions(+), 334 deletions(-)

Modified: trunk/libs/utility/swap/test/lib_header_1.cpp
==============================================================================
--- trunk/libs/utility/swap/test/lib_header_1.cpp (original)
+++ trunk/libs/utility/swap/test/lib_header_1.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -6,13 +6,4 @@
 
 // Tests that the swap header compiles as a standalone translation unit
 
-#include <boost/utility/swap.hpp>
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// Tests that the swap header compiles as a standalone translation unit
-
-#include <boost/utility/swap.hpp>
+#include <boost/utility/swap.hpp>
\ No newline at end of file

Modified: trunk/libs/utility/swap/test/lib_header_2.cpp
==============================================================================
--- trunk/libs/utility/swap/test/lib_header_2.cpp (original)
+++ trunk/libs/utility/swap/test/lib_header_2.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -8,13 +8,4 @@
 
 #include <boost/utility/swap.hpp>
 #include <boost/utility/swap.hpp>
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-// Tests that the swap header include guards work correctly
-
-#include <boost/utility/swap.hpp>
-#include <boost/utility/swap.hpp>

Modified: trunk/libs/utility/swap/test/mixed_headers_1.cpp
==============================================================================
--- trunk/libs/utility/swap/test/mixed_headers_1.cpp (original)
+++ trunk/libs/utility/swap/test/mixed_headers_1.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -8,13 +8,4 @@
 
 #include <boost/swap.hpp>
 #include <boost/utility/swap.hpp>
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-// Tests that the swap headers work when both are included
-
-#include <boost/swap.hpp>
-#include <boost/utility/swap.hpp>

Modified: trunk/libs/utility/swap/test/mixed_headers_2.cpp
==============================================================================
--- trunk/libs/utility/swap/test/mixed_headers_2.cpp (original)
+++ trunk/libs/utility/swap/test/mixed_headers_2.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -8,13 +8,5 @@
 
 #include <boost/utility/swap.hpp>
 #include <boost/swap.hpp>
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-// Tests that the swap headers work when both are included
 
-#include <boost/utility/swap.hpp>
-#include <boost/swap.hpp>

Modified: trunk/libs/utility/swap/test/primitive.cpp
==============================================================================
--- trunk/libs/utility/swap/test/primitive.cpp (original)
+++ trunk/libs/utility/swap/test/primitive.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -20,25 +20,4 @@
 
   return 0;
 }
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/utility/swap.hpp>
-#define BOOST_INCLUDE_MAIN
-#include <boost/test/test_tools.hpp>
-
-int test_main(int, char*[])
-{
- int object1 = 1;
- int object2 = 2;
-
- boost::swap(object1,object2);
-
- BOOST_CHECK_EQUAL(object1,2);
- BOOST_CHECK_EQUAL(object2,1);
-
- return 0;
-}

Modified: trunk/libs/utility/swap/test/root_header_1.cpp
==============================================================================
--- trunk/libs/utility/swap/test/root_header_1.cpp (original)
+++ trunk/libs/utility/swap/test/root_header_1.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -7,12 +7,4 @@
 // Tests that the swap header compiles as a standalone translation unit
 
 #include <boost/swap.hpp>
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-// Tests that the swap header compiles as a standalone translation unit
-
-#include <boost/swap.hpp>

Modified: trunk/libs/utility/swap/test/root_header_2.cpp
==============================================================================
--- trunk/libs/utility/swap/test/root_header_2.cpp (original)
+++ trunk/libs/utility/swap/test/root_header_2.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -8,13 +8,4 @@
 
 #include <boost/swap.hpp>
 #include <boost/swap.hpp>
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-// Tests that the swap header include guards work correctly
-
-#include <boost/swap.hpp>
-#include <boost/swap.hpp>

Modified: trunk/libs/utility/swap/test/specialized_in_boost.cpp
==============================================================================
--- trunk/libs/utility/swap/test/specialized_in_boost.cpp (original)
+++ trunk/libs/utility/swap/test/specialized_in_boost.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -34,39 +34,4 @@
 
   return 0;
 }
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/utility/swap.hpp>
-#define BOOST_INCLUDE_MAIN
-#include <boost/test/test_tools.hpp>
-
-//Put test class in namespace boost
-namespace boost
-{
- #include "./swap_test_class.hpp"
-}
-
-//Provide swap function in namespace boost
-namespace boost
-{
- void swap(swap_test_class& left, swap_test_class& right)
- {
- left.swap(right);
- }
-}
-
-int test_main(int, char*[])
-{
- boost::swap_test_class object1;
- boost::swap_test_class object2;
- boost::swap(object1,object2);
-
- BOOST_CHECK_EQUAL(boost::swap_test_class::swap_count(),1);
- BOOST_CHECK_EQUAL(boost::swap_test_class::copy_count(),0);
-
- return 0;
-}

Modified: trunk/libs/utility/swap/test/specialized_in_global.cpp
==============================================================================
--- trunk/libs/utility/swap/test/specialized_in_global.cpp (original)
+++ trunk/libs/utility/swap/test/specialized_in_global.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -28,33 +28,4 @@
 
   return 0;
 }
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/utility/swap.hpp>
-#define BOOST_INCLUDE_MAIN
-#include <boost/test/test_tools.hpp>
-
-//Put test class in the global namespace
-#include "./swap_test_class.hpp"
-
-//Provide swap function in gloabl namespace
-void swap(swap_test_class& left, swap_test_class& right)
-{
- left.swap(right);
-}
-
-int test_main(int, char*[])
-{
- swap_test_class object1;
- swap_test_class object2;
- boost::swap(object1,object2);
-
- BOOST_CHECK_EQUAL(swap_test_class::swap_count(),1);
- BOOST_CHECK_EQUAL(swap_test_class::copy_count(),0);
-
- return 0;
-}

Modified: trunk/libs/utility/swap/test/specialized_in_other.cpp
==============================================================================
--- trunk/libs/utility/swap/test/specialized_in_other.cpp (original)
+++ trunk/libs/utility/swap/test/specialized_in_other.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -34,39 +34,4 @@
 
   return 0;
 }
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/utility/swap.hpp>
-#define BOOST_INCLUDE_MAIN
-#include <boost/test/test_tools.hpp>
-
-//Put test class in namespace other
-namespace other
-{
- #include "./swap_test_class.hpp"
-}
-
-//Provide swap function in namespace other
-namespace other
-{
- void swap(swap_test_class& left, swap_test_class& right)
- {
- left.swap(right);
- }
-}
-
-int test_main(int, char*[])
-{
- other::swap_test_class object1;
- other::swap_test_class object2;
- boost::swap(object1,object2);
-
- BOOST_CHECK_EQUAL(other::swap_test_class::swap_count(),1);
- BOOST_CHECK_EQUAL(other::swap_test_class::copy_count(),0);
-
- return 0;
-}

Modified: trunk/libs/utility/swap/test/specialized_in_std.cpp
==============================================================================
--- trunk/libs/utility/swap/test/specialized_in_std.cpp (original)
+++ trunk/libs/utility/swap/test/specialized_in_std.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -33,38 +33,4 @@
 
   return 0;
 }
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/utility/swap.hpp>
-#define BOOST_INCLUDE_MAIN
-#include <boost/test/test_tools.hpp>
-
-//Put test class in the global namespace
-#include "./swap_test_class.hpp"
-
-
-//Provide swap function in namespace std
-namespace std
-{
- template <>
- void swap(swap_test_class& left, swap_test_class& right)
- {
- left.swap(right);
- }
-}
-
-int test_main(int, char*[])
-{
- swap_test_class object1;
- swap_test_class object2;
- boost::swap(object1,object2);
-
- BOOST_CHECK_EQUAL(swap_test_class::swap_count(),1);
- BOOST_CHECK_EQUAL(swap_test_class::copy_count(),0);
-
- return 0;
-}

Modified: trunk/libs/utility/swap/test/swap_arrays.cpp
==============================================================================
--- trunk/libs/utility/swap/test/swap_arrays.cpp (original)
+++ trunk/libs/utility/swap/test/swap_arrays.cpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -37,42 +37,4 @@
 
   return 0;
 }
-// Copyright (c) 2008 Joseph Gauterin, Niels Dekker
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/utility/swap.hpp>
-#define BOOST_INCLUDE_MAIN
-#include <boost/test/test_tools.hpp>
-
-//Put test class in the global namespace
-#include "./swap_test_class.hpp"
-
-
-int test_main(int, char*[])
-{
- const std::size_t dimension = 7;
-
- swap_test_class array1[dimension];
- swap_test_class array2[dimension];
- boost::swap(array1, array2);
-
- BOOST_CHECK_EQUAL(swap_test_class::swap_count(), dimension);
- BOOST_CHECK_EQUAL(swap_test_class::copy_count(), 0);
-
- swap_test_class::reset();
-
- const std::size_t firstDimension = 3;
- const std::size_t secondDimension = 4;
-
- swap_test_class two_d_array1[firstDimension][secondDimension];
- swap_test_class two_d_array2[firstDimension][secondDimension];
- boost::swap(two_d_array1, two_d_array1);
-
- BOOST_CHECK_EQUAL(swap_test_class::swap_count(), firstDimension*secondDimension);
- BOOST_CHECK_EQUAL(swap_test_class::copy_count(), 0);
-
- return 0;
-}

Modified: trunk/libs/utility/swap/test/swap_test_class.hpp
==============================================================================
--- trunk/libs/utility/swap/test/swap_test_class.hpp (original)
+++ trunk/libs/utility/swap/test/swap_test_class.hpp 2008-07-19 15:40:12 EDT (Sat, 19 Jul 2008)
@@ -1,10 +1,10 @@
-// Copyright (c) 2007 Joseph Gauterin
+// Copyright (c) 2007-2008 Joseph Gauterin
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-// Tests that the swap header compiles as a standalone translation unit
+// Tests class used by the Boost.Swap tests
 
 #ifndef BOOST_UTILITY_SWAP_TEST_CLASS_HPP
 #define BOOST_UTILITY_SWAP_TEST_CLASS_HPP
@@ -82,90 +82,3 @@
 };
 
 #endif
-
-// Copyright (c) 2007 Joseph Gauterin
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// Tests that the swap header compiles as a standalone translation unit
-
-#ifndef BOOST_UTILITY_SWAP_TEST_CLASS_HPP
-#define BOOST_UTILITY_SWAP_TEST_CLASS_HPP
-
-
-class swap_test_class
-{
-public:
- swap_test_class()
- {
- ++constructCount();
- }
-
- ~swap_test_class()
- {
- ++destructCount();
- }
-
- swap_test_class(const swap_test_class&)
- {
- ++copyCount();
- ++destructCount();
- }
-
- swap_test_class& operator=(const swap_test_class&)
- {
- ++copyCount();
- return *this;
- }
-
- void swap(swap_test_class& other)
- {
- ++swapCount();
- }
-
-
- static unsigned int swap_count(){ return swapCount(); }
- static unsigned int copy_count(){ return copyCount(); }
- static unsigned int construct_count(){ return constructCount(); }
- static unsigned int destruct_count(){ return destructCount(); }
-
- static void reset()
- {
- swapCount() = 0;
- copyCount() = 0;
- constructCount() = 0;
- destructCount() = 0;
- }
-
-private:
- static unsigned int& swapCount()
- {
- static unsigned int value = 0;
- return value;
- }
-
- static unsigned int& copyCount()
- {
- static unsigned int value = 0;
- return value;
- }
-
- static unsigned int& constructCount()
- {
- static unsigned int value = 0;
- return value;
- }
-
- static unsigned int& destructCount()
- {
- static unsigned int value = 0;
- return value;
- }
-
-};
-
-#endif
-
-


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk