Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70445 - in branches/release: boost/functional/hash libs/functional/hash libs/functional/hash/test
From: dnljms_at_[hidden]
Date: 2011-03-22 20:10:06


Author: danieljames
Date: 2011-03-22 20:10:03 EDT (Tue, 22 Mar 2011)
New Revision: 70445
URL: http://svn.boost.org/trac/boost/changeset/70445

Log:
Hash: merge updated tests.

- Remove shared_ptr_fail_test, since shared_ptr now has a hash function.
- Run several tests with and without implicit casts.

Removed:
   branches/release/libs/functional/hash/test/container_fwd_test.cpp
   branches/release/libs/functional/hash/test/container_no_fwd_test.cpp
   branches/release/libs/functional/hash/test/shared_ptr_fail_test.cpp
Properties modified:
   branches/release/boost/functional/hash/ (props changed)
   branches/release/libs/functional/hash/ (props changed)
Text files modified:
   branches/release/libs/functional/hash/test/Jamfile.v2 | 82 +++++++++++++++++++++------------------
   1 files changed, 44 insertions(+), 38 deletions(-)

Modified: branches/release/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- branches/release/libs/functional/hash/test/Jamfile.v2 (original)
+++ branches/release/libs/functional/hash/test/Jamfile.v2 2011-03-22 20:10:03 EDT (Tue, 22 Mar 2011)
@@ -1,5 +1,5 @@
 
-# Copyright 2005-2008 Daniel James.
+# Copyright 2005-2011 Daniel James.
 # 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)
 
@@ -7,7 +7,6 @@
 
 project hash-tests
     : requirements
- <define>BOOST_HASH_NO_IMPLICIT_CASTS
         <warnings>all
         <toolset>intel:<warnings>on
         <toolset>intel:<cxxflags>-strict-ansi
@@ -20,42 +19,49 @@
 
 test-suite functional/hash
     :
- [ run hash_fwd_test_1.cpp ]
- [ run hash_fwd_test_2.cpp ]
- [ run hash_number_test.cpp ]
- [ run hash_pointer_test.cpp ]
- [ run hash_function_pointer_test.cpp ]
- [ run hash_float_test.cpp ]
- [ run hash_long_double_test.cpp ]
- [ run hash_string_test.cpp ]
- [ run hash_range_test.cpp ]
- [ run hash_custom_test.cpp ]
- [ run hash_global_namespace_test.cpp ]
- [ run hash_friend_test.cpp ]
- [ run hash_built_in_array_test.cpp ]
- [ run hash_value_array_test.cpp ]
- [ run hash_vector_test.cpp ]
- [ run hash_list_test.cpp ]
- [ run hash_deque_test.cpp ]
- [ run hash_set_test.cpp ]
- [ run hash_map_test.cpp ]
- [ run hash_complex_test.cpp ]
- [ run hash_type_index_test.cpp ]
- [ run link_test.cpp link_test_2.cpp ]
- [ run link_ext_test.cpp link_no_ext_test.cpp ]
- [ run extensions_hpp_test.cpp ]
- [ run container_fwd_test.cpp ]
- [ run container_fwd_test.cpp : :
- : <toolset>gcc:<define>_GLIBCXX_DEBUG
- <toolset>darwin:<define>_GLIBCXX_DEBUG
- : container_fwd_gcc_debug ]
- [ run container_no_fwd_test.cpp ]
- [ compile-fail hash_no_ext_fail_test.cpp ]
- [ compile-fail namespace_fail_test.cpp ]
- [ compile-fail implicit_fail_test.cpp ]
- [ compile-fail shared_ptr_fail_test.cpp ]
- [ run hash_no_ext_macro_1.cpp ]
- [ run hash_no_ext_macro_2.cpp ]
+ [ run hash_fwd_test_1.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_fwd_test_2.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_number_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_pointer_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_function_pointer_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_float_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_long_double_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_string_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_range_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_custom_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_global_namespace_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_friend_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_built_in_array_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_value_array_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_vector_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_list_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_deque_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_set_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_map_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_complex_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_type_index_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run link_test.cpp link_test_2.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run link_ext_test.cpp link_no_ext_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run extensions_hpp_test.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ compile-fail hash_no_ext_fail_test.cpp : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ compile-fail namespace_fail_test.cpp : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ compile-fail implicit_fail_test.cpp : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_no_ext_macro_1.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ [ run hash_no_ext_macro_2.cpp : : : <define>BOOST_HASH_NO_IMPLICIT_CASTS ]
+ ;
+
+test-suite functional/hash_implicit_casts
+ :
+ [ run hash_number_test.cpp : : : : implicit_number ]
+ [ run hash_pointer_test.cpp : : : : implicit_pointer ]
+ [ run hash_function_pointer_test.cpp : : : : implicit_function_pointer ]
+ [ run hash_float_test.cpp : : : : implicit_float ]
+ [ run hash_string_test.cpp : : : : implicit_string ]
+ [ run hash_range_test.cpp : : : : implicit_range ]
+ [ run hash_custom_test.cpp : : : : implicit_custom ]
+ [ run hash_built_in_array_test.cpp : : : : implicit_built_in_array ]
+ [ run link_test.cpp link_test_2.cpp : : : : implicit_link ]
+ [ run implicit_fail_test.cpp : : : : implicit_test ]
     ;
 
 test-suite functional/hash_no_ext

Deleted: branches/release/libs/functional/hash/test/container_fwd_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/container_fwd_test.cpp 2011-03-22 20:10:03 EDT (Tue, 22 Mar 2011)
+++ (empty file)
@@ -1,114 +0,0 @@
-
-// Copyright 2005-2009 Daniel James.
-// 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 "./config.hpp"
-
-#include <boost/functional/detail/container_fwd.hpp>
-
-#if BOOST_WORKAROUND(__GNUC__, < 3) && \
- !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
-template <class charT, class Allocator>
-static void test(
- std::basic_string<charT, std::string_char_traits<charT>, Allocator> const&)
-{
-}
-#else
-template <class charT, class Allocator>
-static void test(
- std::basic_string<charT, std::char_traits<charT>, Allocator> const&)
-{
-}
-#endif
-
-template <class T, class Allocator>
-static void test(std::deque<T, Allocator> const&)
-{
-}
-
-template <class T, class Allocator>
-static void test(std::list<T, Allocator> const&)
-{
-}
-
-template <class T, class Allocator>
-static void test(std::vector<T, Allocator> const&)
-{
-}
-
-template <class Key, class T, class Compare, class Allocator>
-static void test(std::map<Key, T, Compare, Allocator> const&)
-{
-}
-
-template <class Key, class T, class Compare, class Allocator>
-static void test(std::multimap<Key, T, Compare, Allocator> const&)
-{
-}
-
-template <class Key, class Compare, class Allocator>
-static void test(std::set<Key, Compare, Allocator> const&)
-{
-}
-
-template <class Key, class Compare, class Allocator>
-static void test(std::multiset<Key, Compare, Allocator> const&)
-{
-}
-
-template <std::size_t N>
-static void test(std::bitset<N> const&)
-{
-}
-
-template <class T>
-static void test(std::complex<T> const&)
-{
-}
-
-template <class X, class Y>
-static void test(std::pair<X, Y> const&)
-{
-}
-
-#include <deque>
-#include <list>
-#include <vector>
-#include <map>
-#include <set>
-#include <bitset>
-#include <string>
-#include <complex>
-#include <utility>
-
-int main()
-{
- std::deque<int> x1;
- std::list<std::string> x2;
- std::vector<float> x3;
- std::vector<bool> x4;
- std::map<int, int> x5;
- std::multimap<float, int*> x6;
- std::set<std::string> x7;
- std::multiset<std::vector<int> > x8;
- std::bitset<10> x9;
- std::string x10;
- std::complex<double> x11;
- std::pair<std::list<int>, char***> x12;
-
- test(x1);
- test(x2);
- test(x3);
- test(x4);
- test(x5);
- test(x6);
- test(x7);
- test(x8);
- test(x9);
- test(x10);
- test(x11);
- test(x12);
-
- return 0;
-}

Deleted: branches/release/libs/functional/hash/test/container_no_fwd_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/container_no_fwd_test.cpp 2011-03-22 20:10:03 EDT (Tue, 22 Mar 2011)
+++ (empty file)
@@ -1,14 +0,0 @@
-
-// Copyright 2010 Daniel James.
-// 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)
-
-#define BOOST_DETAIL_NO_CONTAINER_FWD
-
-#include <boost/detail/container_fwd.hpp>
-
-int main()
-{
- std::set<int> x;
- std::vector<std::string> y;
-}

Deleted: branches/release/libs/functional/hash/test/shared_ptr_fail_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/shared_ptr_fail_test.cpp 2011-03-22 20:10:03 EDT (Tue, 22 Mar 2011)
+++ (empty file)
@@ -1,16 +0,0 @@
-
-// Copyright 2010 Daniel James.
-// 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/functional/hash.hpp>
-#include <boost/shared_ptr.hpp>
-
-// This should obviously pass if shared_ptr ever supports Boost.Hash.
-
-int main() {
- boost::hash<boost::shared_ptr<int> > hash;
- boost::shared_ptr<int> x(new int(10));
-
- hash(x);
-}


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