Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86386 - trunk/libs/uuid/test
From: andrey.semashev_at_[hidden]
Date: 2013-10-21 19:11:34


Author: andysem
Date: 2013-10-21 19:11:34 EDT (Mon, 21 Oct 2013)
New Revision: 86386
URL: http://svn.boost.org/trac/boost/changeset/86386

Log:
Fixed compilation.

Text files modified:
   trunk/libs/uuid/test/test_uuid.cpp | 1 +
   trunk/libs/uuid/test/test_uuid_no_simd.cpp | 25 +++++++++++++++++++++++++
   2 files changed, 26 insertions(+), 0 deletions(-)

Modified: trunk/libs/uuid/test/test_uuid.cpp
==============================================================================
--- trunk/libs/uuid/test/test_uuid.cpp Mon Oct 21 19:01:25 2013 (r86385)
+++ trunk/libs/uuid/test/test_uuid.cpp 2013-10-21 19:11:34 EDT (Mon, 21 Oct 2013) (r86386)
@@ -9,6 +9,7 @@
 
 // libs/uuid/test/test_uuid.cpp -------------------------------//
 
+#include <iostream>
 #include <boost/uuid/uuid.hpp>
 #include <boost/uuid/uuid_io.hpp>
 #include <boost/detail/lightweight_test.hpp>

Modified: trunk/libs/uuid/test/test_uuid_no_simd.cpp
==============================================================================
--- trunk/libs/uuid/test/test_uuid_no_simd.cpp Mon Oct 21 19:01:25 2013 (r86385)
+++ trunk/libs/uuid/test/test_uuid_no_simd.cpp 2013-10-21 19:11:34 EDT (Mon, 21 Oct 2013) (r86386)
@@ -15,9 +15,34 @@
 
 #define BOOST_UUID_NO_SIMD
 
+#include <iostream>
 #include <boost/uuid/uuid.hpp>
 #include <boost/uuid/uuid_io.hpp>
 #include <boost/detail/lightweight_test.hpp>
+#include <boost/current_function.hpp>
+
+void test_uuid_equal_array(char const * file, int line, char const * function,
+ boost::uuids::uuid const& lhs, const unsigned char (&rhs)[16])
+{
+ for (size_t i=0; i<16; i++) {
+ if ( *(lhs.begin()+i) != rhs[i]) {
+ std::cerr << file << "(" << line << "): uuid " << lhs << " not equal " << "{";
+ for (size_t j=0; j<16; j++) {
+ if (j != 0) {
+ std::cerr << " ";
+ }
+ std::cerr << std::hex << (int)rhs[j];
+ }
+ std::cerr << "} in function '" << function << "'" << std::endl;
+ ++boost::detail::test_errors();
+ return;
+ }
+ }
+}
+
+
+#define BOOST_TEST_UUID(lhs, rhs) ( test_uuid_equal_array(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION, lhs, rhs) )
+
 
 int main(int, char*[])
 {


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