Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58231 - in trunk: boost/uuid libs/uuid/test
From: atompkins_at_[hidden]
Date: 2009-12-07 22:13:41


Author: atompkins
Date: 2009-12-07 22:13:40 EST (Mon, 07 Dec 2009)
New Revision: 58231
URL: http://svn.boost.org/trac/boost/changeset/58231

Log:
Fix for test_uuid - hash function for 64-bit machines
Text files modified:
   trunk/boost/uuid/uuid.hpp | 4 ++--
   trunk/boost/uuid/uuid_generators.hpp | 6 +++---
   trunk/libs/uuid/test/test_uuid.cpp | 8 ++++----
   3 files changed, 9 insertions(+), 9 deletions(-)

Modified: trunk/boost/uuid/uuid.hpp
==============================================================================
--- trunk/boost/uuid/uuid.hpp (original)
+++ trunk/boost/uuid/uuid.hpp 2009-12-07 22:13:40 EST (Mon, 07 Dec 2009)
@@ -47,8 +47,8 @@
 
 #ifdef BOOST_NO_STDC_NAMESPACE
 namespace std {
- using ::size_t
- using ::ptrdiff_t
+ using ::size_t;
+ using ::ptrdiff_t;
 } //namespace std
 #endif //BOOST_NO_STDC_NAMESPACE
 

Modified: trunk/boost/uuid/uuid_generators.hpp
==============================================================================
--- trunk/boost/uuid/uuid_generators.hpp (original)
+++ trunk/boost/uuid/uuid_generators.hpp 2009-12-07 22:13:40 EST (Mon, 07 Dec 2009)
@@ -27,8 +27,8 @@
 
 #ifdef BOOST_NO_STDC_NAMESPACE
 namespace std {
- using ::strlen
- using ::wcslen
+ using ::strlen;
+ using ::wcslen;
 } //namespace std
 #endif //BOOST_NO_STDC_NAMESPACE
 
@@ -224,7 +224,7 @@
     uuid operator()(const wchar_t* name) const {
         return operator()(name, std::wcslen(name)*sizeof(wchar_t));
     }
-
+
     template <typename ch, typename char_traits, typename alloc>
     uuid operator()(std::basic_string<ch, char_traits, alloc> const& name) const {
         return operator()(name.c_str(), name.length()*sizeof(ch));

Modified: trunk/libs/uuid/test/test_uuid.cpp
==============================================================================
--- trunk/libs/uuid/test/test_uuid.cpp (original)
+++ trunk/libs/uuid/test/test_uuid.cpp 2009-12-07 22:13:40 EST (Mon, 07 Dec 2009)
@@ -164,10 +164,10 @@
         uuid u3 = {{255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255}};
 
         boost::hash<uuid> uuid_hasher;
-
- BOOST_CHECK_EQUAL(uuid_hasher(u1), 3565488559U);
- BOOST_CHECK_EQUAL(uuid_hasher(u2), 1668670635U);
- BOOST_CHECK_EQUAL(uuid_hasher(u3), 223353791U);
+
+ BOOST_CHECK_EQUAL(uuid_hasher(u1), boost::hash_range(u1.begin(), u1.end()));
+ BOOST_CHECK_EQUAL(uuid_hasher(u2), boost::hash_range(u2.begin(), u2.end()));
+ BOOST_CHECK_EQUAL(uuid_hasher(u3), boost::hash_range(u3.begin(), u3.end()));
     }
     
     { // test is_pod


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