diff --git a/lib/cpp/test/SecurityTest.cpp b/lib/cpp/test/SecurityTest.cpp
index c22d79b..213efd4 100644
--- a/lib/cpp/test/SecurityTest.cpp
+++ b/lib/cpp/test/SecurityTest.cpp
@@ -18,7 +18,7 @@
  */
 
 #define BOOST_TEST_MODULE SecurityTest
-#include <boost/test/auto_unit_test.hpp>
+#include <boost/test/unit_test.hpp>
 #include <boost/bind.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
@@ -55,53 +55,45 @@
     GlobalFixture()
     {
         using namespace boost::unit_test::framework;
-        try
-        {
-            for (int i = 0; i < master_test_suite().argc; ++i)
-            {
-                BOOST_MESSAGE(boost::format("argv[%1%] = \"%2%\"") % i % master_test_suite().argv[i]);
-            }
+		for (int i = 0; i < master_test_suite().argc; ++i)
+		{
+			BOOST_TEST_MESSAGE(boost::format("argv[%1%] = \"%2%\"") % i % master_test_suite().argv[i]);
+		}
 
     #ifdef linux
-            // OpenSSL calls send() without MSG_NOSIGPIPE so writing to a socket that has
-            // disconnected can cause a SIGPIPE signal...
-            signal(SIGPIPE, SIG_IGN);
+		// OpenSSL calls send() without MSG_NOSIGPIPE so writing to a socket that has
+		// disconnected can cause a SIGPIPE signal...
+		signal(SIGPIPE, SIG_IGN);
     #endif
 
-            TSSLSocketFactory::setManualOpenSSLInitialization(true);
-            apache::thrift::transport::initializeOpenSSL();
+		TSSLSocketFactory::setManualOpenSSLInitialization(true);
+		apache::thrift::transport::initializeOpenSSL();
 
-            keyDir = boost::filesystem::current_path().parent_path().parent_path().parent_path() / "test" / "keys";
-            if (!boost::filesystem::exists(certFile("server.crt")))
-            {
-                keyDir = boost::filesystem::path(master_test_suite().argv[master_test_suite().argc - 1]);
-                BOOST_REQUIRE_MESSAGE(boost::filesystem::exists(certFile("server.crt")),
-                                      "The last argument to this test must be the directory containing the test certificate(s).");
-            }
-        }
-        catch (std::exception& ex)
-        {
-            BOOST_FAIL(boost::format("%1%: %2%") % typeid(ex).name() % ex.what());
-        }
+		keyDir = boost::filesystem::current_path().parent_path().parent_path().parent_path() / "test" / "keys";
+		if (!boost::filesystem::exists(certFile("server.crt")))
+		{
+			keyDir = boost::filesystem::path(master_test_suite().argv[master_test_suite().argc - 1]);
+			if (!boost::filesystem::exists(certFile("server.crt")))
+			{
+				throw std::invalid_argument("The last argument to this test must be the directory containing the test certificate(s).");
+			}
+		}
     }
 
     virtual ~GlobalFixture()
     {
-        try
-        {
-            apache::thrift::transport::cleanupOpenSSL();
+		apache::thrift::transport::cleanupOpenSSL();
 #ifdef linux
-            signal(SIGPIPE, SIG_DFL);
+		signal(SIGPIPE, SIG_DFL);
 #endif
-        }
-        catch (std::exception& ex)
-        {
-            BOOST_MESSAGE(boost::format("%1%: %2%") % typeid(ex).name() % ex.what());
-        }
     }
 };
 
+#if (BOOST_VERSION >= 105900)
+BOOST_GLOBAL_FIXTURE(GlobalFixture);
+#else
 BOOST_GLOBAL_FIXTURE(GlobalFixture)
+#endif
 
 struct SecurityFixture : public TestPortFixture
 {
@@ -139,7 +131,7 @@
             catch (apache::thrift::transport::TTransportException& ex)
             {
                 boost::mutex::scoped_lock lock(gMutex);
-                BOOST_MESSAGE(boost::format("SRV %1% Exception: %2%") % boost::this_thread::get_id() % ex.what());
+                BOOST_TEST_MESSAGE(boost::format("SRV %1% Exception: %2%") % boost::this_thread::get_id() % ex.what());
             }
 
             if (connectedClient)
@@ -184,7 +176,7 @@
             catch (apache::thrift::transport::TTransportException& ex)
             {
                 boost::mutex::scoped_lock lock(gMutex);
-                BOOST_MESSAGE(boost::format("CLI %1% Exception: %2%") % boost::this_thread::get_id() % ex.what());
+                BOOST_TEST_MESSAGE(boost::format("CLI %1% Exception: %2%") % boost::this_thread::get_id() % ex.what());
             }
 
             if (pClientSocket)
@@ -249,7 +241,7 @@
 
                 boost::mutex::scoped_lock lock(mMutex);
 
-                BOOST_MESSAGE(boost::format("TEST: Server = %1%, Client = %2%")
+                BOOST_TEST_MESSAGE(boost::format("TEST: Server = %1%, Client = %2%")
                     % protocol2str(si) % protocol2str(ci));
 
                 mConnected = false;
diff --git a/lib/cpp/test/TMemoryBufferTest.cpp b/lib/cpp/test/TMemoryBufferTest.cpp
index 492eead..84103e3 100644
--- a/lib/cpp/test/TMemoryBufferTest.cpp
+++ b/lib/cpp/test/TMemoryBufferTest.cpp
@@ -89,7 +89,7 @@
   string* str2 = new string("plsreuse");
   bool obj_reuse = (str1 == str2);
   bool dat_reuse = (data1 == str2->data());
-  BOOST_MESSAGE("Object reuse: " << obj_reuse << "   Data reuse: " << dat_reuse
+  BOOST_TEST_MESSAGE("Object reuse: " << obj_reuse << "   Data reuse: " << dat_reuse
                 << ((obj_reuse && dat_reuse) ? "   YAY!" : ""));
   delete str2;
 
diff --git a/lib/cpp/test/TServerIntegrationTest.cpp b/lib/cpp/test/TServerIntegrationTest.cpp
index 38cbc21..f530771 100644
--- a/lib/cpp/test/TServerIntegrationTest.cpp
+++ b/lib/cpp/test/TServerIntegrationTest.cpp
@@ -176,7 +176,7 @@
       pEventHandler->wait();
     }
 
-    BOOST_MESSAGE("server is listening");
+    BOOST_TEST_MESSAGE("server is listening");
   }
 
   void blockUntilAccepted(uint64_t numAccepted) {
@@ -185,16 +185,16 @@
       pEventHandler->wait();
     }
 
-    BOOST_MESSAGE(boost::format("server has accepted %1%") % numAccepted);
+    BOOST_TEST_MESSAGE(boost::format("server has accepted %1%") % numAccepted);
   }
 
   void stopServer() {
     if (pServerThread) {
       pServer->stop();
-      BOOST_MESSAGE("server stop completed");
+      BOOST_TEST_MESSAGE("server stop completed");
 
       pServerThread->join();
-      BOOST_MESSAGE("server thread joined");
+      BOOST_TEST_MESSAGE("server thread joined");
       pServerThread.reset();
     }
   }
diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp
index 7bd8aa0..c056a5d 100644
--- a/lib/cpp/test/TransportTest.cpp
+++ b/lib/cpp/test/TransportTest.cpp
@@ -33,6 +33,7 @@
 #include <boost/random.hpp>
 #include <boost/type_traits.hpp>
 #include <boost/test/unit_test.hpp>
+#include <boost/version.hpp>
 
 #include <thrift/transport/TBufferTransports.h>
 #include <thrift/transport/TFDTransport.h>
@@ -919,6 +920,12 @@
                 rand4k);
   }
 
+#if (BOOST_VERSION >= 105900)
+#define MAKE_TEST_CASE(_FUNC, _NAME) boost::unit_test::make_test_case(_FUNC, _NAME, __FILE__, __LINE__)
+#else
+#define MAKE_TEST_CASE(_FUNC, _NAME) boost::unit_test::make_test_case(_FUNC, _NAME)
+#endif
+
 private:
   template <class CoupledTransports>
   void addTestRW(const char* transport_name,
@@ -937,7 +944,11 @@
          << rSizeGen.describe() << ", " << wChunkSizeGen.describe() << ", "
          << rChunkSizeGen.describe() << ", " << maxOutstanding << ")";
 
+#if (BOOST_VERSION >= 105900)
+    boost::function<void ()> test_func
+#else
     boost::unit_test::callback0<> test_func
+#endif
         = apache::thrift::stdcxx::bind(test_rw<CoupledTransports>,
                                        totalSize,
                                        wSizeGen,
@@ -945,39 +956,30 @@
                                        wChunkSizeGen,
                                        rChunkSizeGen,
                                        maxOutstanding);
-    boost::unit_test::test_case* tc = boost::unit_test::make_test_case(test_func, name.str());
-    suite_->add(tc, expectedFailures);
+    suite_->add(MAKE_TEST_CASE(test_func, name.str()), expectedFailures);
   }
 
   template <class CoupledTransports>
   void addTestBlocking(const char* transportName, uint32_t expectedFailures = 0) {
     char name[1024];
-    boost::unit_test::test_case* tc;
 
     THRIFT_SNPRINTF(name, sizeof(name), "%s::test_read_part_available()", transportName);
-    tc = boost::unit_test::make_test_case(test_read_part_available<CoupledTransports>, name);
-    suite_->add(tc, expectedFailures);
+    suite_->add(MAKE_TEST_CASE(test_read_part_available<CoupledTransports>, name), expectedFailures);
 
     THRIFT_SNPRINTF(name, sizeof(name), "%s::test_read_part_available_in_chunks()", transportName);
-    tc = boost::unit_test::make_test_case(test_read_part_available_in_chunks<CoupledTransports>,
-                                          name);
-    suite_->add(tc, expectedFailures);
+    suite_->add(MAKE_TEST_CASE(test_read_part_available_in_chunks<CoupledTransports>, name), expectedFailures);
 
     THRIFT_SNPRINTF(name, sizeof(name), "%s::test_read_partial_midframe()", transportName);
-    tc = boost::unit_test::make_test_case(test_read_partial_midframe<CoupledTransports>, name);
-    suite_->add(tc, expectedFailures);
+    suite_->add(MAKE_TEST_CASE(test_read_partial_midframe<CoupledTransports>, name), expectedFailures);
 
     THRIFT_SNPRINTF(name, sizeof(name), "%s::test_read_none_available()", transportName);
-    tc = boost::unit_test::make_test_case(test_read_none_available<CoupledTransports>, name);
-    suite_->add(tc, expectedFailures);
+    suite_->add(MAKE_TEST_CASE(test_read_none_available<CoupledTransports>, name), expectedFailures);
 
     THRIFT_SNPRINTF(name, sizeof(name), "%s::test_borrow_part_available()", transportName);
-    tc = boost::unit_test::make_test_case(test_borrow_part_available<CoupledTransports>, name);
-    suite_->add(tc, expectedFailures);
+    suite_->add(MAKE_TEST_CASE(test_borrow_part_available<CoupledTransports>, name), expectedFailures);
 
     THRIFT_SNPRINTF(name, sizeof(name), "%s::test_borrow_none_available()", transportName);
-    tc = boost::unit_test::make_test_case(test_borrow_none_available<CoupledTransports>, name);
-    suite_->add(tc, expectedFailures);
+    suite_->add(MAKE_TEST_CASE(test_borrow_none_available<CoupledTransports>, name), expectedFailures);
   }
 
   boost::unit_test::test_suite* suite_;
@@ -1016,7 +1018,11 @@
   }
 };
 
+#if (BOOST_VERSION >= 105900)
+BOOST_GLOBAL_FIXTURE(global_fixture);
+#else
 BOOST_GLOBAL_FIXTURE(global_fixture)
+#endif
 
 boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) {
   THRIFT_UNUSED_VARIABLE(argc);
diff --git a/lib/cpp/test/ZlibTest.cpp b/lib/cpp/test/ZlibTest.cpp
index cf628ed..fa237a2 100644
--- a/lib/cpp/test/ZlibTest.cpp
+++ b/lib/cpp/test/ZlibTest.cpp
@@ -32,9 +32,11 @@
 #include <iostream>
 #include <thrift/cxxfunctional.h>
 
+#include <boost/function.hpp>
 #include <boost/random.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/test/unit_test.hpp>
+#include <boost/version.hpp>
 
 #include <thrift/transport/TBufferTransports.h>
 #include <thrift/transport/TZlibTransport.h>
@@ -328,16 +330,28 @@
  * Initialization
  */
 
-#define ADD_TEST_CASE(suite, name, function, ...)                                                  \
+#if (BOOST_VERSION >= 105900)
+#define ADD_TEST_CASE(suite, name, _FUNC, ...)                                                     \
   do {                                                                                             \
     ::std::ostringstream name_ss;                                                                  \
-    name_ss << name << "-" << BOOST_STRINGIZE(function);                                           \
+    name_ss << name << "-" << BOOST_STRINGIZE(_FUNC);                                              \
+    boost::function<void ()> test_func = ::apache::thrift::stdcxx::bind(_FUNC, ##__VA_ARGS__);     \
     ::boost::unit_test::test_case* tc                                                              \
-        = ::boost::unit_test::make_test_case(::apache::thrift::stdcxx::bind(function,              \
+        = ::boost::unit_test::make_test_case(test_func, name_ss.str(), __FILE__, __LINE__);        \
+    (suite)->add(tc);                                                                              \
+  } while (0)
+#else
+#define ADD_TEST_CASE(suite, name, _FUNC, ...)                                                     \
+  do {                                                                                             \
+    ::std::ostringstream name_ss;                                                                  \
+    name_ss << name << "-" << BOOST_STRINGIZE(_FUNC);                                              \
+    ::boost::unit_test::test_case* tc                                                              \
+        = ::boost::unit_test::make_test_case(::apache::thrift::stdcxx::bind(_FUNC,                 \
                                                                             ##__VA_ARGS__),        \
                                              name_ss.str());                                       \
     (suite)->add(tc);                                                                              \
   } while (0)
+#endif
 
 void add_tests(boost::unit_test::test_suite* suite,
                const boost::shared_array<uint8_t>& buf,
