diff --git a/lib/cpp/test/AllProtocolTests.cpp b/lib/cpp/test/AllProtocolTests.cpp
index 29ba193..a1bccb5 100644
--- a/lib/cpp/test/AllProtocolTests.cpp
+++ b/lib/cpp/test/AllProtocolTests.cpp
@@ -22,6 +22,10 @@
 #include <thrift/protocol/TBinaryProtocol.h>
 #include <thrift/protocol/TCompactProtocol.h>
 #include <thrift/transport/TBufferTransports.h>
+
+#define BOOST_TEST_MODULE AllProtocolTests
+#include <boost/test/unit_test.hpp>
+
 #include "AllProtocolTests.tcc"
 
 using namespace apache::thrift;
@@ -30,15 +34,10 @@
 
 char errorMessage[ERR_LEN];
 
-int main(int argc, char** argv) {
-  (void)argc;
-  (void)argv;
-  try {
-    testProtocol<TBinaryProtocol>("TBinaryProtocol");
-    testProtocol<TCompactProtocol>("TCompactProtocol");
-  } catch (TException e) {
-    printf("%s\n", e.what());
-    return 1;
-  }
-  return 0;
+BOOST_AUTO_TEST_CASE(test_binary_protocol) {
+  testProtocol<TBinaryProtocol>("TBinaryProtocol");
+}
+
+BOOST_AUTO_TEST_CASE(test_compact_protocol) {
+  testProtocol<TCompactProtocol>("TCompactProtocol");
 }
diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
index 8587fa8..365db8f 100644
--- a/lib/cpp/test/CMakeLists.txt
+++ b/lib/cpp/test/CMakeLists.txt
@@ -147,10 +147,16 @@
 endif()
 
 add_executable(TFDTransportTest TFDTransportTest.cpp)
+target_link_libraries(TFDTransportTest
+    ${Boost_LIBRARIES}
+)
 LINK_AGAINST_THRIFT_LIBRARY(TFDTransportTest thrift)
 add_test(NAME TFDTransportTest COMMAND TFDTransportTest)
 
 add_executable(TPipedTransportTest TPipedTransportTest.cpp)
+target_link_libraries(TPipedTransportTest
+    ${Boost_LIBRARIES}
+)
 LINK_AGAINST_THRIFT_LIBRARY(TPipedTransportTest thrift)
 add_test(NAME TPipedTransportTest COMMAND TPipedTransportTest)
 
@@ -161,35 +167,53 @@
     )
 
 add_executable(AllProtocolsTest ${AllProtocolsTest_SOURCES})
-target_link_libraries(AllProtocolsTest testgencpp)
+target_link_libraries(AllProtocolsTest
+    testgencpp
+    ${Boost_LIBRARIES}
+)
 LINK_AGAINST_THRIFT_LIBRARY(AllProtocolsTest thrift)
 add_test(NAME AllProtocolsTest COMMAND AllProtocolsTest)
 
 # The debug run-time in Windows asserts on isprint() with negative inputs
 if (NOT MSVC OR (MSVC AND CMAKE_BUILD_TYPE EQUAL "DEBUG"))
 add_executable(DebugProtoTest DebugProtoTest.cpp)
-target_link_libraries(DebugProtoTest testgencpp)
+target_link_libraries(DebugProtoTest
+    testgencpp
+    ${Boost_LIBRARIES}
+)
 LINK_AGAINST_THRIFT_LIBRARY(DebugProtoTest thrift)
 add_test(NAME DebugProtoTest COMMAND DebugProtoTest)
 endif()
 
 add_executable(JSONProtoTest JSONProtoTest.cpp)
-target_link_libraries(JSONProtoTest testgencpp)
+target_link_libraries(JSONProtoTest
+    testgencpp
+    ${Boost_LIBRARIES}
+)
 LINK_AGAINST_THRIFT_LIBRARY(JSONProtoTest thrift)
 add_test(NAME JSONProtoTest COMMAND JSONProtoTest)
 
 add_executable(OptionalRequiredTest OptionalRequiredTest.cpp)
-target_link_libraries(OptionalRequiredTest testgencpp)
+target_link_libraries(OptionalRequiredTest
+    testgencpp
+    ${Boost_LIBRARIES}
+)
 LINK_AGAINST_THRIFT_LIBRARY(OptionalRequiredTest thrift)
 add_test(NAME OptionalRequiredTest COMMAND OptionalRequiredTest)
 
 add_executable(RecursiveTest RecursiveTest.cpp)
-target_link_libraries(RecursiveTest testgencpp)
+target_link_libraries(RecursiveTest
+    testgencpp
+    ${Boost_LIBRARIES}
+)
 LINK_AGAINST_THRIFT_LIBRARY(RecursiveTest thrift)
 add_test(NAME RecursiveTest COMMAND RecursiveTest)
 
 add_executable(SpecializationTest SpecializationTest.cpp)
-target_link_libraries(SpecializationTest testgencpp)
+target_link_libraries(SpecializationTest
+    testgencpp
+    ${Boost_LIBRARIES}
+)
 LINK_AGAINST_THRIFT_LIBRARY(SpecializationTest thrift)
 add_test(NAME SpecializationTest COMMAND SpecializationTest)
 
diff --git a/lib/cpp/test/DebugProtoTest.cpp b/lib/cpp/test/DebugProtoTest.cpp
index 98c66b8..607744b 100644
--- a/lib/cpp/test/DebugProtoTest.cpp
+++ b/lib/cpp/test/DebugProtoTest.cpp
@@ -18,72 +18,169 @@
  */
 
 #define _USE_MATH_DEFINES
-#include <iostream>
 #include <cmath>
 #include "gen-cpp/DebugProtoTest_types.h"
 #include <thrift/protocol/TDebugProtocol.h>
 
-int main() {
-  using std::cout;
-  using std::endl;
-  using namespace thrift::test::debug;
+#define BOOST_TEST_MODULE DebugProtoTest
+#include <boost/test/unit_test.hpp>
 
-  OneOfEach ooe;
-  ooe.im_true = true;
-  ooe.im_false = false;
-  ooe.a_bite = 0x7f;
-  ooe.integer16 = 27000;
-  ooe.integer32 = 1 << 24;
-  ooe.integer64 = (uint64_t)6000 * 1000 * 1000;
-  ooe.double_precision = M_PI;
-  ooe.some_characters = "Debug THIS!";
-  ooe.zomg_unicode = "\xd7\n\a\t";
+using namespace thrift::test::debug;
 
-  cout << apache::thrift::ThriftDebugString(ooe) << endl << endl;
+static std::auto_ptr<OneOfEach> ooe;
 
-  Nesting n;
-  n.my_ooe = ooe;
-  n.my_ooe.integer16 = 16;
-  n.my_ooe.integer32 = 32;
-  n.my_ooe.integer64 = 64;
-  n.my_ooe.double_precision = (std::sqrt(5.0) + 1) / 2;
-  n.my_ooe.some_characters = ":R (me going \"rrrr\")";
-  n.my_ooe.zomg_unicode     = "\xd3\x80\xe2\x85\xae\xce\x9d\x20"
-                              "\xd0\x9d\xce\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0\xb0\xcf\x81\xe2\x84\x8e"
-                              "\x20\xce\x91\x74\x74\xce\xb1\xe2\x85\xbd\xce\xba\xc7\x83\xe2\x80\xbc";
-  n.my_bonk.type = 31337;
-  n.my_bonk.message = "I am a bonk... xor!";
+void testCaseSetup_1() {
+  ooe.reset(new OneOfEach);
+  ooe->im_true = true;
+  ooe->im_false = false;
+  ooe->a_bite = 0x7f;
+  ooe->integer16 = 27000;
+  ooe->integer32 = 1 << 24;
+  ooe->integer64 = (uint64_t)6000 * 1000 * 1000;
+  ooe->double_precision = M_PI;
+  ooe->some_characters = "Debug THIS!";
+  ooe->zomg_unicode = "\xd7\n\a\t";
+}
 
-  cout << apache::thrift::ThriftDebugString(n) << endl << endl;
+BOOST_AUTO_TEST_CASE(test_debug_proto_1) {
+  testCaseSetup_1();
 
-  HolyMoley hm;
+  const std::string expected_result(
+    "OneOfEach {\n"
+    "  01: im_true (bool) = true,\n"
+    "  02: im_false (bool) = false,\n"
+    "  03: a_bite (byte) = 0x7f,\n"
+    "  04: integer16 (i16) = 27000,\n"
+    "  05: integer32 (i32) = 16777216,\n"
+    "  06: integer64 (i64) = 6000000000,\n"
+    "  07: double_precision (double) = 3.1415926535897931,\n"
+    "  08: some_characters (string) = \"Debug THIS!\",\n"
+    "  09: zomg_unicode (string) = \"\\xd7\\n\\a\\t\",\n"
+    "  10: what_who (bool) = false,\n"
+    "  11: base64 (string) = \"\",\n"
+    "  12: byte_list (list) = list<byte>[3] {\n"
+    "    [0] = 0x01,\n"
+    "    [1] = 0x02,\n"
+    "    [2] = 0x03,\n"
+    "  },\n"
+    "  13: i16_list (list) = list<i16>[3] {\n"
+    "    [0] = 1,\n"
+    "    [1] = 2,\n"
+    "    [2] = 3,\n"
+    "  },\n"
+    "  14: i64_list (list) = list<i64>[3] {\n"
+    "    [0] = 1,\n"
+    "    [1] = 2,\n"
+    "    [2] = 3,\n"
+    "  },\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(*ooe));
 
-  hm.big.push_back(ooe);
-  hm.big.push_back(n.my_ooe);
-  hm.big[0].a_bite = 0x22;
-  hm.big[1].a_bite = 0x33;
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+static std::auto_ptr<Nesting> n;
+
+void testCaseSetup_2() {
+  testCaseSetup_1();
+
+  n.reset(new Nesting);
+  n->my_ooe = *ooe;
+  n->my_ooe.integer16 = 16;
+  n->my_ooe.integer32 = 32;
+  n->my_ooe.integer64 = 64;
+  n->my_ooe.double_precision = (std::sqrt(5.0) + 1) / 2;
+  n->my_ooe.some_characters = ":R (me going \"rrrr\")";
+  n->my_ooe.zomg_unicode     = "\xd3\x80\xe2\x85\xae\xce\x9d\x20\xd0\x9d\xce"
+                               "\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0"
+                               "\xb0\xcf\x81\xe2\x84\x8e\x20\xce\x91\x74\x74"
+                               "\xce\xb1\xe2\x85\xbd\xce\xba\xc7\x83\xe2\x80"
+                               "\xbc";
+  n->my_bonk.type = 31337;
+  n->my_bonk.message = "I am a bonk... xor!";
+}
+
+BOOST_AUTO_TEST_CASE(test_debug_proto_2) {
+  testCaseSetup_2();
+
+  const std::string expected_result(
+    "Nesting {\n"
+    "  01: my_bonk (struct) = Bonk {\n"
+    "    01: type (i32) = 31337,\n"
+    "    02: message (string) = \"I am a bonk... xor!\",\n"
+    "  },\n"
+    "  02: my_ooe (struct) = OneOfEach {\n"
+    "    01: im_true (bool) = true,\n"
+    "    02: im_false (bool) = false,\n"
+    "    03: a_bite (byte) = 0x7f,\n"
+    "    04: integer16 (i16) = 16,\n"
+    "    05: integer32 (i32) = 32,\n"
+    "    06: integer64 (i64) = 64,\n"
+    "    07: double_precision (double) = 1.6180339887498949,\n"
+    "    08: some_characters (string) = \":R (me going \\\"rrrr\\\")\",\n"
+    "    09: zomg_unicode (string) = \"\\xd3\\x80\\xe2\\x85\\xae\\xce\\x9d \\xd"
+      "0\\x9d\\xce\\xbf\\xe2\\x85\\xbf\\xd0\\xbe\\xc9\\xa1\\xd0\\xb3\\xd0\\xb0"
+      "\\xcf\\x81\\xe2\\x84\\x8e \\xce\\x91tt\\xce\\xb1\\xe2\\x85\\xbd\\xce\\xb"
+      "a\\xc7\\x83\\xe2\\x80\\xbc\",\n"
+    "    10: what_who (bool) = false,\n"
+    "    11: base64 (string) = \"\",\n"
+    "    12: byte_list (list) = list<byte>[3] {\n"
+    "      [0] = 0x01,\n"
+    "      [1] = 0x02,\n"
+    "      [2] = 0x03,\n"
+    "    },\n"
+    "    13: i16_list (list) = list<i16>[3] {\n"
+    "      [0] = 1,\n"
+    "      [1] = 2,\n"
+    "      [2] = 3,\n"
+    "    },\n"
+    "    14: i64_list (list) = list<i64>[3] {\n"
+    "      [0] = 1,\n"
+    "      [1] = 2,\n"
+    "      [2] = 3,\n"
+    "    },\n"
+    "  },\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(*n));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+static std::auto_ptr<HolyMoley> hm;
+
+void testCaseSetup_3() {
+  testCaseSetup_2();
+
+  hm.reset(new HolyMoley);
+
+  hm->big.push_back(*ooe);
+  hm->big.push_back(n->my_ooe);
+  hm->big[0].a_bite = 0x22;
+  hm->big[1].a_bite = 0x33;
 
   std::vector<std::string> stage1;
   stage1.push_back("and a one");
   stage1.push_back("and a two");
-  hm.contain.insert(stage1);
+  hm->contain.insert(stage1);
   stage1.clear();
   stage1.push_back("then a one, two");
   stage1.push_back("three!");
   stage1.push_back("FOUR!!");
-  hm.contain.insert(stage1);
+  hm->contain.insert(stage1);
   stage1.clear();
-  hm.contain.insert(stage1);
+  hm->contain.insert(stage1);
 
   std::vector<Bonk> stage2;
-  hm.bonks["nothing"] = stage2;
+  hm->bonks["nothing"] = stage2;
   stage2.resize(stage2.size() + 1);
   stage2.back().type = 1;
   stage2.back().message = "Wait.";
   stage2.resize(stage2.size() + 1);
   stage2.back().type = 2;
   stage2.back().message = "What?";
-  hm.bonks["something"] = stage2;
+  hm->bonks["something"] = stage2;
   stage2.clear();
   stage2.resize(stage2.size() + 1);
   stage2.back().type = 3;
@@ -94,9 +191,119 @@
   stage2.resize(stage2.size() + 1);
   stage2.back().type = 5;
   stage2.back().message = "nevermore";
-  hm.bonks["poe"] = stage2;
+  hm->bonks["poe"] = stage2;
+}
 
-  cout << apache::thrift::ThriftDebugString(hm) << endl << endl;
+BOOST_AUTO_TEST_CASE(test_debug_proto_3) {
+  testCaseSetup_3();
 
-  return 0;
+  const std::string expected_result(
+    "HolyMoley {\n"
+    "  01: big (list) = list<struct>[2] {\n"
+    "    [0] = OneOfEach {\n"
+    "      01: im_true (bool) = true,\n"
+    "      02: im_false (bool) = false,\n"
+    "      03: a_bite (byte) = 0x22,\n"
+    "      04: integer16 (i16) = 27000,\n"
+    "      05: integer32 (i32) = 16777216,\n"
+    "      06: integer64 (i64) = 6000000000,\n"
+    "      07: double_precision (double) = 3.1415926535897931,\n"
+    "      08: some_characters (string) = \"Debug THIS!\",\n"
+    "      09: zomg_unicode (string) = \"\\xd7\\n\\a\\t\",\n"
+    "      10: what_who (bool) = false,\n"
+    "      11: base64 (string) = \"\",\n"
+    "      12: byte_list (list) = list<byte>[3] {\n"
+    "        [0] = 0x01,\n"
+    "        [1] = 0x02,\n"
+    "        [2] = 0x03,\n"
+    "      },\n"
+    "      13: i16_list (list) = list<i16>[3] {\n"
+    "        [0] = 1,\n"
+    "        [1] = 2,\n"
+    "        [2] = 3,\n"
+    "      },\n"
+    "      14: i64_list (list) = list<i64>[3] {\n"
+    "        [0] = 1,\n"
+    "        [1] = 2,\n"
+    "        [2] = 3,\n"
+    "      },\n"
+    "    },\n"
+    "    [1] = OneOfEach {\n"
+    "      01: im_true (bool) = true,\n"
+    "      02: im_false (bool) = false,\n"
+    "      03: a_bite (byte) = 0x33,\n"
+    "      04: integer16 (i16) = 16,\n"
+    "      05: integer32 (i32) = 32,\n"
+    "      06: integer64 (i64) = 64,\n"
+    "      07: double_precision (double) = 1.6180339887498949,\n"
+    "      08: some_characters (string) = \":R (me going \\\"rrrr\\\")\",\n"
+    "      09: zomg_unicode (string) = \"\\xd3\\x80\\xe2\\x85\\xae\\xce\\x9d \\"
+      "xd0\\x9d\\xce\\xbf\\xe2\\x85\\xbf\\xd0\\xbe\\xc9\\xa1\\xd0\\xb3\\xd0\\xb"
+      "0\\xcf\\x81\\xe2\\x84\\x8e \\xce\\x91tt\\xce\\xb1\\xe2\\x85\\xbd\\xce\\x"
+      "ba\\xc7\\x83\\xe2\\x80\\xbc\",\n"
+    "      10: what_who (bool) = false,\n"
+    "      11: base64 (string) = \"\",\n"
+    "      12: byte_list (list) = list<byte>[3] {\n"
+    "        [0] = 0x01,\n"
+    "        [1] = 0x02,\n"
+    "        [2] = 0x03,\n"
+    "      },\n"
+    "      13: i16_list (list) = list<i16>[3] {\n"
+    "        [0] = 1,\n"
+    "        [1] = 2,\n"
+    "        [2] = 3,\n"
+    "      },\n"
+    "      14: i64_list (list) = list<i64>[3] {\n"
+    "        [0] = 1,\n"
+    "        [1] = 2,\n"
+    "        [2] = 3,\n"
+    "      },\n"
+    "    },\n"
+    "  },\n"
+    "  02: contain (set) = set<list>[3] {\n"
+    "    list<string>[0] {\n"
+    "    },\n"
+    "    list<string>[2] {\n"
+    "      [0] = \"and a one\",\n"
+    "      [1] = \"and a two\",\n"
+    "    },\n"
+    "    list<string>[3] {\n"
+    "      [0] = \"then a one, two\",\n"
+    "      [1] = \"three!\",\n"
+    "      [2] = \"FOUR!!\",\n"
+    "    },\n"
+    "  },\n"
+    "  03: bonks (map) = map<string,list>[3] {\n"
+    "    \"nothing\" -> list<struct>[0] {\n"
+    "    },\n"
+    "    \"poe\" -> list<struct>[3] {\n"
+    "      [0] = Bonk {\n"
+    "        01: type (i32) = 3,\n"
+    "        02: message (string) = \"quoth\",\n"
+    "      },\n"
+    "      [1] = Bonk {\n"
+    "        01: type (i32) = 4,\n"
+    "        02: message (string) = \"the raven\",\n"
+    "      },\n"
+    "      [2] = Bonk {\n"
+    "        01: type (i32) = 5,\n"
+    "        02: message (string) = \"nevermore\",\n"
+    "      },\n"
+    "    },\n"
+    "    \"something\" -> list<struct>[2] {\n"
+    "      [0] = Bonk {\n"
+    "        01: type (i32) = 1,\n"
+    "        02: message (string) = \"Wait.\",\n"
+    "      },\n"
+    "      [1] = Bonk {\n"
+    "        01: type (i32) = 2,\n"
+    "        02: message (string) = \"What?\",\n"
+    "      },\n"
+    "    },\n"
+    "  },\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(*hm));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
 }
diff --git a/lib/cpp/test/DenseProtoTest.cpp b/lib/cpp/test/DenseProtoTest.cpp
index d827d3c..0beaa38 100644
--- a/lib/cpp/test/DenseProtoTest.cpp
+++ b/lib/cpp/test/DenseProtoTest.cpp
@@ -34,7 +34,6 @@
 #undef NDEBUG
 #include <cstdlib>
 #include <cassert>
-#include <iostream>
 #include <cmath>
 #include <string>
 #include "gen-cpp/DebugProtoTest_types.h"
@@ -42,6 +41,16 @@
 #include <thrift/protocol/TDenseProtocol.h>
 #include <thrift/transport/TBufferTransports.h>
 
+#define BOOST_TEST_MODULE DenseProtoTest
+#include <boost/test/unit_test.hpp>
+
+using std::string;
+using boost::shared_ptr;
+using namespace thrift::test;
+using namespace thrift::test::debug;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::protocol;
+
 // Can't use memcmp here.  GCC is too smart.
 bool my_memeq(const char* str1, const char* str2, int len) {
   for (int i = 0; i < len; i++) {
@@ -52,15 +61,7 @@
   return true;
 }
 
-int main() {
-  using std::string;
-  using std::cout;
-  using std::endl;
-  using boost::shared_ptr;
-  using namespace thrift::test::debug;
-  using namespace apache::thrift::transport;
-  using namespace apache::thrift::protocol;
-
+BOOST_AUTO_TEST_CASE(test_dense_proto_1) {
   OneOfEach ooe;
   ooe.im_true = true;
   ooe.im_false = false;
@@ -139,20 +140,32 @@
   HolyMoley hm2;
   hm2.read(proto.get());
 
-  assert(hm == hm2);
+  BOOST_CHECK(hm == hm2);
+}
 
-  // Let's test out the variable-length ints, shall we?
-  uint64_t vlq;
-#define checkout(i, c)                                                                             \
-  {                                                                                                \
-    buffer->resetBuffer();                                                                         \
-    proto->vlqWrite(i);                                                                            \
-    proto->getTransport()->flush();                                                                \
-    assert(my_memeq(buffer->getBufferAsString().data(), c, sizeof(c) - 1));                        \
-    proto->vlqRead(vlq);                                                                           \
-    assert(vlq == i);                                                                              \
+/*
+ * Following Testcases are currently disabled, because vlqWrite and vlqRead are
+ * private members.
+ */
+#if 0
+#define checkout(i, c)                                                          \
+  {                                                                             \
+    uint64_t vlq;                                                               \
+    buffer->resetBuffer();                                                      \
+    proto->vlqWrite(i);                                                         \
+    proto->getTransport()->flush();                                             \
+    BOOST_CHECK(my_memeq(buffer->getBufferAsString().data(), c, sizeof(c) - 1));\
+    proto->vlqRead(vlq);                                                        \
+    assert(vlq == i);                                                           \
   }
 
+BOOST_AUTO_TEST_CASE(test_dense_proto_2) {
+  // Let's test out the variable-length ints, shall we?
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
+
+  proto->setTypeSpec(HolyMoley::local_reflection);
+
   checkout(0x00000000, "\x00");
   checkout(0x00000040, "\x40");
   checkout(0x0000007F, "\x7F");
@@ -180,10 +193,17 @@
   checkout(0x1FFFFFFFFFFFFFFFull, "\x9F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F");
   checkout(0x7FFFFFFFFFFFFFFFull, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F");
   checkout(0xFFFFFFFFFFFFFFFFull, "\x81\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F");
+}
 
+BOOST_AUTO_TEST_CASE(test_dense_proto_3) {
   // Test out the slow path with a TBufferedTransport.
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
   shared_ptr<TBufferedTransport> buff_trans(new TBufferedTransport(buffer, 3));
+
+  proto->setTypeSpec(HolyMoley::local_reflection);
   proto.reset(new TDenseProtocol(buff_trans));
+
   checkout(0x0000000100000000ull, "\x90\x80\x80\x80\x00");
   checkout(0x0000000200000000ull, "\xA0\x80\x80\x80\x00");
   checkout(0x0000000300000000ull, "\xB0\x80\x80\x80\x00");
@@ -194,11 +214,17 @@
   checkout(0x1FFFFFFFFFFFFFFFull, "\x9F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F");
   checkout(0x7FFFFFFFFFFFFFFFull, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F");
   checkout(0xFFFFFFFFFFFFFFFFull, "\x81\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F");
+}
+#endif
 
-  // Test optional stuff.
+// Test optional stuff.
+BOOST_AUTO_TEST_CASE(test_dense_proto_4_1) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
   proto.reset(new TDenseProtocol(buffer));
   proto->setTypeSpec(ManyOpt::local_reflection);
-  ManyOpt mo1, mo2, mo3, mo4, mo5, mo6;
+
+  ManyOpt mo1, mo2;
   mo1.opt1 = 923759347;
   mo1.opt2 = 392749274;
   mo1.opt3 = 395739402;
@@ -215,147 +241,231 @@
   mo1.write(proto.get());
   mo2.read(proto.get());
 
-  assert(mo2.__isset.opt1 == true);
-  assert(mo2.__isset.opt2 == true);
-  assert(mo2.__isset.opt3 == true);
-  assert(mo2.__isset.def4 == true);
-  assert(mo2.__isset.opt5 == true);
-  assert(mo2.__isset.opt6 == true);
+  BOOST_CHECK(mo2.__isset.opt1 == true);
+  BOOST_CHECK(mo2.__isset.opt2 == true);
+  BOOST_CHECK(mo2.__isset.opt3 == true);
+  BOOST_CHECK(mo2.__isset.def4 == true);
+  BOOST_CHECK(mo2.__isset.opt5 == true);
+  BOOST_CHECK(mo2.__isset.opt6 == true);
 
-  assert(mo1 == mo2);
+  BOOST_CHECK(mo1 == mo2);
+}
 
+BOOST_AUTO_TEST_CASE(test_dense_proto_4_2) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
+  proto.reset(new TDenseProtocol(buffer));
+  proto->setTypeSpec(ManyOpt::local_reflection);
+
+  ManyOpt mo1, mo2;
+  mo1.opt1 = 923759347;
+  mo1.opt2 = 392749274;
+  mo1.opt3 = 395739402;
+  mo1.def4 = 294730928;
+  mo1.opt5 = 394309218;
+  mo1.opt6 = 832194723;
   mo1.__isset.opt1 = false;
+  mo1.__isset.opt2 = true;
   mo1.__isset.opt3 = false;
+  mo1.__isset.def4 = true;
   mo1.__isset.opt5 = false;
+  mo1.__isset.opt6 = true;
 
   mo1.write(proto.get());
-  mo3.read(proto.get());
+  mo2.read(proto.get());
 
-  assert(mo3.__isset.opt1 == false);
-  assert(mo3.__isset.opt2 == true);
-  assert(mo3.__isset.opt3 == false);
-  assert(mo3.__isset.def4 == true);
-  assert(mo3.__isset.opt5 == false);
-  assert(mo3.__isset.opt6 == true);
+  BOOST_CHECK(mo2.__isset.opt1 == false);
+  BOOST_CHECK(mo2.__isset.opt2 == true);
+  BOOST_CHECK(mo2.__isset.opt3 == false);
+  BOOST_CHECK(mo2.__isset.def4 == true);
+  BOOST_CHECK(mo2.__isset.opt5 == false);
+  BOOST_CHECK(mo2.__isset.opt6 == true);
 
-  assert(mo1 == mo3);
+  BOOST_CHECK(mo1 == mo2);
+}
 
+BOOST_AUTO_TEST_CASE(test_dense_proto_4_3) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
+  proto.reset(new TDenseProtocol(buffer));
+  proto->setTypeSpec(ManyOpt::local_reflection);
+
+  ManyOpt mo1, mo2;
+  mo1.opt1 = 923759347;
+  mo1.opt2 = 392749274;
+  mo1.opt3 = 395739402;
+  mo1.def4 = 294730928;
+  mo1.opt5 = 394309218;
+  mo1.opt6 = 832194723;
   mo1.__isset.opt1 = true;
-  mo1.__isset.opt3 = true;
-  mo1.__isset.opt5 = true;
   mo1.__isset.opt2 = false;
+  mo1.__isset.opt3 = true;
+  mo1.__isset.def4 = true;
+  mo1.__isset.opt5 = true;
   mo1.__isset.opt6 = false;
 
   mo1.write(proto.get());
-  mo4.read(proto.get());
+  mo2.read(proto.get());
 
-  assert(mo4.__isset.opt1 == true);
-  assert(mo4.__isset.opt2 == false);
-  assert(mo4.__isset.opt3 == true);
-  assert(mo4.__isset.def4 == true);
-  assert(mo4.__isset.opt5 == true);
-  assert(mo4.__isset.opt6 == false);
+  BOOST_CHECK(mo2.__isset.opt1 == true);
+  BOOST_CHECK(mo2.__isset.opt2 == false);
+  BOOST_CHECK(mo2.__isset.opt3 == true);
+  BOOST_CHECK(mo2.__isset.def4 == true);
+  BOOST_CHECK(mo2.__isset.opt5 == true);
+  BOOST_CHECK(mo2.__isset.opt6 == false);
 
-  assert(mo1 == mo4);
+  BOOST_CHECK(mo1 == mo2);
+}
 
+BOOST_AUTO_TEST_CASE(test_dense_proto_4_4) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
+  proto.reset(new TDenseProtocol(buffer));
+  proto->setTypeSpec(ManyOpt::local_reflection);
+
+  ManyOpt mo1, mo2;
+  mo1.opt1 = 923759347;
+  mo1.opt2 = 392749274;
+  mo1.opt3 = 395739402;
+  mo1.def4 = 294730928;
+  mo1.opt5 = 394309218;
+  mo1.opt6 = 832194723;
   mo1.__isset.opt1 = false;
+  mo1.__isset.opt2 = false;
+  mo1.__isset.opt3 = true;
+  mo1.__isset.def4 = true;
   mo1.__isset.opt5 = false;
+  mo1.__isset.opt6 = false;
 
   mo1.write(proto.get());
-  mo5.read(proto.get());
+  mo2.read(proto.get());
 
-  assert(mo5.__isset.opt1 == false);
-  assert(mo5.__isset.opt2 == false);
-  assert(mo5.__isset.opt3 == true);
-  assert(mo5.__isset.def4 == true);
-  assert(mo5.__isset.opt5 == false);
-  assert(mo5.__isset.opt6 == false);
+  BOOST_CHECK(mo2.__isset.opt1 == false);
+  BOOST_CHECK(mo2.__isset.opt2 == false);
+  BOOST_CHECK(mo2.__isset.opt3 == true);
+  BOOST_CHECK(mo2.__isset.def4 == true);
+  BOOST_CHECK(mo2.__isset.opt5 == false);
+  BOOST_CHECK(mo2.__isset.opt6 == false);
 
-  assert(mo1 == mo5);
+  BOOST_CHECK(mo1 == mo2);
+}
 
+BOOST_AUTO_TEST_CASE(test_dense_proto_4_5) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
+  proto.reset(new TDenseProtocol(buffer));
+  proto->setTypeSpec(ManyOpt::local_reflection);
+
+  ManyOpt mo1, mo2;
+  mo1.opt1 = 923759347;
+  mo1.opt2 = 392749274;
+  mo1.opt3 = 395739402;
+  mo1.def4 = 294730928;
+  mo1.opt5 = 394309218;
+  mo1.opt6 = 832194723;
+  mo1.__isset.opt1 = false;
+  mo1.__isset.opt2 = false;
   mo1.__isset.opt3 = false;
+  mo1.__isset.def4 = true;
+  mo1.__isset.opt5 = false;
+  mo1.__isset.opt6 = false;
 
   mo1.write(proto.get());
-  mo6.read(proto.get());
+  mo2.read(proto.get());
 
-  assert(mo6.__isset.opt1 == false);
-  assert(mo6.__isset.opt2 == false);
-  assert(mo6.__isset.opt3 == false);
-  assert(mo6.__isset.def4 == true);
-  assert(mo6.__isset.opt5 == false);
-  assert(mo6.__isset.opt6 == false);
+  BOOST_CHECK(mo2.__isset.opt1 == false);
+  BOOST_CHECK(mo2.__isset.opt2 == false);
+  BOOST_CHECK(mo2.__isset.opt3 == false);
+  BOOST_CHECK(mo2.__isset.def4 == true);
+  BOOST_CHECK(mo2.__isset.opt5 == false);
+  BOOST_CHECK(mo2.__isset.opt6 == false);
 
-  assert(mo1 == mo6);
+  BOOST_CHECK(mo1 == mo2);
+}
 
-  // Test fingerprint checking stuff.
+// Test fingerprint checking stuff.
+BOOST_AUTO_TEST_CASE(test_dense_proto_5_1) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
 
-  {
-    // Default and required have the same fingerprint.
-    Tricky1 t1;
-    Tricky3 t3;
-    assert(string(Tricky1::ascii_fingerprint) == Tricky3::ascii_fingerprint);
-    proto->setTypeSpec(Tricky1::local_reflection);
-    t1.im_default = 227;
-    t1.write(proto.get());
-    proto->setTypeSpec(Tricky3::local_reflection);
-    t3.read(proto.get());
-    assert(t3.im_required == 227);
-  }
+  // Default and required have the same fingerprint.
+  Tricky1 t1;
+  Tricky3 t3;
+  BOOST_CHECK(string(Tricky1::ascii_fingerprint) == Tricky3::ascii_fingerprint);
+  proto->setTypeSpec(Tricky1::local_reflection);
+  t1.im_default = 227;
+  t1.write(proto.get());
+  proto->setTypeSpec(Tricky3::local_reflection);
+  t3.read(proto.get());
+  BOOST_CHECK(t3.im_required == 227);
+}
 
-  {
-    // Optional changes things.
-    Tricky1 t1;
-    Tricky2 t2;
-    assert(string(Tricky1::ascii_fingerprint) != Tricky2::ascii_fingerprint);
-    proto->setTypeSpec(Tricky1::local_reflection);
-    t1.im_default = 227;
-    t1.write(proto.get());
-    try {
-      proto->setTypeSpec(Tricky2::local_reflection);
-      t2.read(proto.get());
-      assert(false);
-    } catch (TProtocolException& ex) {
-      buffer->resetBuffer();
-    }
-  }
+BOOST_AUTO_TEST_CASE(test_dense_proto_5_2) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
 
-  {
-    // Holy cow.  We can use the Tricky1 typespec with the Tricky2 structure.
-    Tricky1 t1;
-    Tricky2 t2;
-    proto->setTypeSpec(Tricky1::local_reflection);
-    t1.im_default = 227;
-    t1.write(proto.get());
+  // Optional changes things.
+  Tricky1 t1;
+  Tricky2 t2;
+  BOOST_CHECK(string(Tricky1::ascii_fingerprint) != Tricky2::ascii_fingerprint);
+  proto->setTypeSpec(Tricky1::local_reflection);
+  t1.im_default = 227;
+  t1.write(proto.get());
+  try {
+    proto->setTypeSpec(Tricky2::local_reflection);
     t2.read(proto.get());
-    assert(t2.__isset.im_optional == true);
-    assert(t2.im_optional == 227);
+    BOOST_CHECK(false);
+  } catch (TProtocolException& ex) {
+    buffer->resetBuffer();
   }
+}
 
-  {
-    // And totally off the wall.
-    Tricky1 t1;
-    OneOfEach ooe2;
-    assert(string(Tricky1::ascii_fingerprint) != OneOfEach::ascii_fingerprint);
-    proto->setTypeSpec(Tricky1::local_reflection);
-    t1.im_default = 227;
-    t1.write(proto.get());
-    try {
-      proto->setTypeSpec(OneOfEach::local_reflection);
-      ooe2.read(proto.get());
-      assert(false);
-    } catch (TProtocolException& ex) {
-      buffer->resetBuffer();
-    }
+BOOST_AUTO_TEST_CASE(test_dense_proto_5_3) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
+
+  // Holy cow.  We can use the Tricky1 typespec with the Tricky2 structure.
+  Tricky1 t1;
+  Tricky2 t2;
+  proto->setTypeSpec(Tricky1::local_reflection);
+  t1.im_default = 227;
+  t1.write(proto.get());
+  t2.read(proto.get());
+  BOOST_CHECK(t2.__isset.im_optional == true);
+  BOOST_CHECK(t2.im_optional == 227);
+}
+
+BOOST_AUTO_TEST_CASE(test_dense_proto_5_4) {
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
+
+  // And totally off the wall.
+  Tricky1 t1;
+  OneOfEach ooe2;
+  BOOST_CHECK(string(Tricky1::ascii_fingerprint) != OneOfEach::ascii_fingerprint);
+  proto->setTypeSpec(Tricky1::local_reflection);
+  t1.im_default = 227;
+  t1.write(proto.get());
+  try {
+    proto->setTypeSpec(OneOfEach::local_reflection);
+    ooe2.read(proto.get());
+    BOOST_CHECK(false);
+  } catch (TProtocolException& ex) {
+    buffer->resetBuffer();
   }
+}
 
+BOOST_AUTO_TEST_CASE(test_dense_proto_6) {
   // Okay, this is really off the wall.
   // Just don't crash.
-  cout << "Starting fuzz test.  This takes a while.  (20 dots.)" << endl;
+  shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
+
+  BOOST_TEST_MESSAGE("Starting fuzz test.  This takes a while.");
   std::srand(12345);
   for (int i = 0; i < 2000; i++) {
     if (i % 100 == 0) {
-      cout << ".";
-      cout.flush();
+      BOOST_TEST_MESSAGE("Do " << i / 100 << "/" << 2000 / 100);
     }
     buffer->resetBuffer();
     // Make sure the fingerprint prefix is right.
@@ -372,7 +482,4 @@
     } catch (TTransportException& ex) {
     }
   }
-  cout << endl;
-
-  return 0;
 }
diff --git a/lib/cpp/test/JSONProtoTest.cpp b/lib/cpp/test/JSONProtoTest.cpp
index aa07f93..da76802 100644
--- a/lib/cpp/test/JSONProtoTest.cpp
+++ b/lib/cpp/test/JSONProtoTest.cpp
@@ -18,75 +18,124 @@
  */
 
 #define _USE_MATH_DEFINES
-#include <iostream>
 #include <cmath>
 #include <thrift/transport/TBufferTransports.h>
 #include <thrift/protocol/TJSONProtocol.h>
 #include "gen-cpp/DebugProtoTest_types.h"
 
-int main() {
-  using std::cout;
-  using std::endl;
-  using namespace thrift::test::debug;
-  using apache::thrift::transport::TMemoryBuffer;
-  using apache::thrift::protocol::TJSONProtocol;
+#define BOOST_TEST_MODULE JSONProtoTest
+#include <boost/test/unit_test.hpp>
 
-  OneOfEach ooe;
-  ooe.im_true = true;
-  ooe.im_false = false;
-  ooe.a_bite = 0x7f;
-  ooe.integer16 = 27000;
-  ooe.integer32 = 1 << 24;
-  ooe.integer64 = (uint64_t)6000 * 1000 * 1000;
-  ooe.double_precision = M_PI;
-  ooe.some_characters = "JSON THIS! \"\1";
-  ooe.zomg_unicode = "\xd7\n\a\t";
-  ooe.base64 = "\1\2\3\255";
-  cout << apache::thrift::ThriftJSONString(ooe) << endl << endl;
+using namespace thrift::test::debug;
+using apache::thrift::transport::TMemoryBuffer;
+using apache::thrift::protocol::TJSONProtocol;
 
-  Nesting n;
-  n.my_ooe = ooe;
-  n.my_ooe.integer16 = 16;
-  n.my_ooe.integer32 = 32;
-  n.my_ooe.integer64 = 64;
-  n.my_ooe.double_precision = (std::sqrt(5.0) + 1) / 2;
-  n.my_ooe.some_characters = ":R (me going \"rrrr\")";
-  n.my_ooe.zomg_unicode     = "\xd3\x80\xe2\x85\xae\xce\x9d\x20"
-                              "\xd0\x9d\xce\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0\xb0\xcf\x81\xe2\x84\x8e"
-                              "\x20\xce\x91\x74\x74\xce\xb1\xe2\x85\xbd\xce\xba\xc7\x83\xe2\x80\xbc";
-  n.my_bonk.type = 31337;
-  n.my_bonk.message = "I am a bonk... xor!";
+static std::auto_ptr<OneOfEach> ooe;
 
-  cout << apache::thrift::ThriftJSONString(n) << endl << endl;
+void testCaseSetup_1() {
+  ooe.reset(new OneOfEach);
+  ooe->im_true = true;
+  ooe->im_false = false;
+  ooe->a_bite = 0x7f;
+  ooe->integer16 = 27000;
+  ooe->integer32 = 1 << 24;
+  ooe->integer64 = (uint64_t)6000 * 1000 * 1000;
+  ooe->double_precision = M_PI;
+  ooe->some_characters = "JSON THIS! \"\1";
+  ooe->zomg_unicode = "\xd7\n\a\t";
+  ooe->base64 = "\1\2\3\255";
+}
 
-  HolyMoley hm;
+BOOST_AUTO_TEST_CASE(test_json_proto_1) {
+  testCaseSetup_1();
 
-  hm.big.push_back(ooe);
-  hm.big.push_back(n.my_ooe);
-  hm.big[0].a_bite = 0x22;
-  hm.big[1].a_bite = 0x33;
+  const std::string expected_result(
+  "{\"1\":{\"tf\":1},\"2\":{\"tf\":0},\"3\":{\"i8\":127},\"4\":{\"i16\":27000},"
+  "\"5\":{\"i32\":16777216},\"6\":{\"i64\":6000000000},\"7\":{\"dbl\":3.1415926"
+  "53589793},\"8\":{\"str\":\"JSON THIS! \\\"\\u0001\"},\"9\":{\"str\":\"\xd7\\"
+  "n\\u0007\\t\"},\"10\":{\"tf\":0},\"11\":{\"str\":\"AQIDrQ\"},\"12\":{\"lst\""
+  ":[\"i8\",3,1,2,3]},\"13\":{\"lst\":[\"i16\",3,1,2,3]},\"14\":{\"lst\":[\"i64"
+  "\",3,1,2,3]}}");
+
+  const std::string result(apache::thrift::ThriftJSONString(*ooe));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+static std::auto_ptr<Nesting> n;
+
+void testCaseSetup_2() {
+  testCaseSetup_1();
+
+  n.reset(new Nesting);
+  n->my_ooe = *ooe;
+  n->my_ooe.integer16 = 16;
+  n->my_ooe.integer32 = 32;
+  n->my_ooe.integer64 = 64;
+  n->my_ooe.double_precision = (std::sqrt(5.0) + 1) / 2;
+  n->my_ooe.some_characters = ":R (me going \"rrrr\")";
+  n->my_ooe.zomg_unicode     = "\xd3\x80\xe2\x85\xae\xce\x9d\x20\xd0\x9d\xce"
+                               "\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0"
+                               "\xb0\xcf\x81\xe2\x84\x8e\x20\xce\x91\x74\x74"
+                               "\xce\xb1\xe2\x85\xbd\xce\xba\xc7\x83\xe2\x80"
+                               "\xbc";
+  n->my_bonk.type = 31337;
+  n->my_bonk.message = "I am a bonk... xor!";
+}
+
+BOOST_AUTO_TEST_CASE(test_json_proto_2) {
+  testCaseSetup_2();
+
+  const std::string expected_result(
+    "{\"1\":{\"rec\":{\"1\":{\"i32\":31337},\"2\":{\"str\":\"I am a bonk... xor"
+    "!\"}}},\"2\":{\"rec\":{\"1\":{\"tf\":1},\"2\":{\"tf\":0},\"3\":{\"i8\":127"
+    "},\"4\":{\"i16\":16},\"5\":{\"i32\":32},\"6\":{\"i64\":64},\"7\":{\"dbl\":"
+    "1.618033988749895},\"8\":{\"str\":\":R (me going \\\"rrrr\\\")\"},\"9\":{"
+    "\"str\":\"ӀⅮΝ Нοⅿоɡгаρℎ Αttαⅽκǃ‼\"},\"10\":{\"tf\":0},\"11\":{\"str\":\""
+    "AQIDrQ\"},\"12\":{\"lst\":[\"i8\",3,1,2,3]},\"13\":{\"lst\":[\"i16\",3,1,2"
+    ",3]},\"14\":{\"lst\":[\"i64\",3,1,2,3]}}}}"
+  );
+
+  const std::string result(apache::thrift::ThriftJSONString(*n));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+static std::auto_ptr<HolyMoley> hm;
+
+void testCaseSetup_3() {
+  testCaseSetup_2();
+
+  hm.reset(new HolyMoley);
+
+  hm->big.push_back(*ooe);
+  hm->big.push_back(n->my_ooe);
+  hm->big[0].a_bite = 0x22;
+  hm->big[1].a_bite = 0x33;
 
   std::vector<std::string> stage1;
   stage1.push_back("and a one");
   stage1.push_back("and a two");
-  hm.contain.insert(stage1);
+  hm->contain.insert(stage1);
   stage1.clear();
   stage1.push_back("then a one, two");
   stage1.push_back("three!");
   stage1.push_back("FOUR!!");
-  hm.contain.insert(stage1);
+  hm->contain.insert(stage1);
   stage1.clear();
-  hm.contain.insert(stage1);
+  hm->contain.insert(stage1);
 
   std::vector<Bonk> stage2;
-  hm.bonks["nothing"] = stage2;
+  hm->bonks["nothing"] = stage2;
   stage2.resize(stage2.size() + 1);
   stage2.back().type = 1;
   stage2.back().message = "Wait.";
   stage2.resize(stage2.size() + 1);
   stage2.back().type = 2;
   stage2.back().message = "What?";
-  hm.bonks["something"] = stage2;
+  hm->bonks["something"] = stage2;
   stage2.clear();
   stage2.resize(stage2.size() + 1);
   stage2.back().type = 3;
@@ -97,33 +146,69 @@
   stage2.resize(stage2.size() + 1);
   stage2.back().type = 5;
   stage2.back().message = "nevermore";
-  hm.bonks["poe"] = stage2;
+  hm->bonks["poe"] = stage2;
+}
 
-  cout << apache::thrift::ThriftJSONString(hm) << endl << endl;
+BOOST_AUTO_TEST_CASE(test_json_proto_3) {
+  testCaseSetup_3();
+
+  const std::string expected_result(
+  "{\"1\":{\"lst\":[\"rec\",2,{\"1\":{\"tf\":1},\"2\":{\"tf\":0},\"3\":{\"i8\":"
+  "34},\"4\":{\"i16\":27000},\"5\":{\"i32\":16777216},\"6\":{\"i64\":6000000000"
+  "},\"7\":{\"dbl\":3.141592653589793},\"8\":{\"str\":\"JSON THIS! \\\"\\u0001"
+  "\"},\"9\":{\"str\":\"\xd7\\n\\u0007\\t\"},\"10\":{\"tf\":0},\"11\":{\"str\":"
+  "\"AQIDrQ\"},\"12\":{\"lst\":[\"i8\",3,1,2,3]},\"13\":{\"lst\":[\"i16\",3,1,2"
+  ",3]},\"14\":{\"lst\":[\"i64\",3,1,2,3]}},{\"1\":{\"tf\":1},\"2\":{\"tf\":0},"
+  "\"3\":{\"i8\":51},\"4\":{\"i16\":16},\"5\":{\"i32\":32},\"6\":{\"i64\":64},"
+  "\"7\":{\"dbl\":1.618033988749895},\"8\":{\"str\":\":R (me going \\\"rrrr\\\""
+  ")\"},\"9\":{\"str\":\"ӀⅮΝ Нοⅿоɡгаρℎ Αttαⅽκǃ‼\"},\"10\":{\"tf\":0},\"11\":{"
+  "\"str\":\"AQIDrQ\"},\"12\":{\"lst\":[\"i8\",3,1,2,3]},\"13\":{\"lst\":[\"i16"
+  "\",3,1,2,3]},\"14\":{\"lst\":[\"i64\",3,1,2,3]}}]},\"2\":{\"set\":[\"lst\",3"
+  ",[\"str\",0],[\"str\",2,\"and a one\",\"and a two\"],[\"str\",3,\"then a one"
+  ", two\",\"three!\",\"FOUR!!\"]]},\"3\":{\"map\":[\"str\",\"lst\",3,{\"nothin"
+  "g\":[\"rec\",0],\"poe\":[\"rec\",3,{\"1\":{\"i32\":3},\"2\":{\"str\":\"quoth"
+  "\"}},{\"1\":{\"i32\":4},\"2\":{\"str\":\"the raven\"}},{\"1\":{\"i32\":5},\""
+  "2\":{\"str\":\"nevermore\"}}],\"something\":[\"rec\",2,{\"1\":{\"i32\":1},\""
+  "2\":{\"str\":\"Wait.\"}},{\"1\":{\"i32\":2},\"2\":{\"str\":\"What?\"}}]}]}}"
+  );
+
+  const std::string result(apache::thrift::ThriftJSONString(*hm));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+BOOST_AUTO_TEST_CASE(test_json_proto_4) {
+  testCaseSetup_1();
 
   boost::shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
   boost::shared_ptr<TJSONProtocol> proto(new TJSONProtocol(buffer));
 
-  cout << "Testing ooe" << endl;
-
-  ooe.write(proto.get());
+  ooe->write(proto.get());
   OneOfEach ooe2;
   ooe2.read(proto.get());
 
-  assert(ooe == ooe2);
+  BOOST_CHECK(*ooe == ooe2);
+}
 
-  cout << "Testing hm" << endl;
+BOOST_AUTO_TEST_CASE(test_json_proto_5) {
+  testCaseSetup_3();
 
-  hm.write(proto.get());
+  boost::shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  boost::shared_ptr<TJSONProtocol> proto(new TJSONProtocol(buffer));
+
+  hm->write(proto.get());
   HolyMoley hm2;
   hm2.read(proto.get());
 
-  assert(hm == hm2);
+  BOOST_CHECK(*hm == hm2);
 
   hm2.big[0].a_bite = 0x00;
 
-  assert(hm != hm2);
+  BOOST_CHECK(*hm != hm2);
+}
 
+BOOST_AUTO_TEST_CASE(test_json_proto_6) {
   Doubles dub;
   dub.nan = HUGE_VAL / HUGE_VAL;
   dub.inf = HUGE_VAL;
@@ -133,9 +218,22 @@
   dub.tiny = 1E-305;
   dub.zero = 0.0;
   dub.negzero = -0.0;
-  cout << apache::thrift::ThriftJSONString(dub) << endl << endl;
 
-  cout << "Testing base" << endl;
+  const std::string expected_result(
+  "{\"1\":{\"dbl\":\"NaN\"},\"2\":{\"dbl\":\"Infinity\"},\"3\":{\"dbl\":\"-Infi"
+  "nity\"},\"4\":{\"dbl\":3.333333333333333},\"5\":{\"dbl\":9.999999999999999e+"
+  "304},\"6\":{\"dbl\":1e-305},\"7\":{\"dbl\":0},\"8\":{\"dbl\":-0}}"
+  );
+
+  const std::string result(apache::thrift::ThriftJSONString(dub));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+BOOST_AUTO_TEST_CASE(test_json_proto_7) {
+  boost::shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
+  boost::shared_ptr<TJSONProtocol> proto(new TJSONProtocol(buffer));
 
   Base64 base;
   base.a = 123;
@@ -150,7 +248,5 @@
   Base64 base2;
   base2.read(proto.get());
 
-  assert(base == base2);
-
-  return 0;
+  BOOST_CHECK(base == base2);
 }
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
index 3470abb..18b4654 100755
--- a/lib/cpp/test/Makefile.am
+++ b/lib/cpp/test/Makefile.am
@@ -88,7 +88,8 @@
 	TFileTransportTest \
 	link_test \
 	OpenSSLManualInitTest \
-	EnumTest
+	EnumTest \
+	DenseProtoTest
 
 if AMX_HAVE_LIBEVENT
 noinst_PROGRAMS += \
@@ -182,8 +183,9 @@
 TFDTransportTest_SOURCES = \
 	TFDTransportTest.cpp
 
-TFDTransportTest_LDADD = \
-	$(top_builddir)/lib/cpp/libthrift.la
+TFDTransportTest_LDADD =  \
+	$(top_builddir)/lib/cpp/libthrift.la \
+	$(BOOST_TEST_LDADD)
 
 
 #
@@ -193,7 +195,8 @@
 	TPipedTransportTest.cpp
 
 TPipedTransportTest_LDADD = \
-	$(top_builddir)/lib/cpp/libthrift.la
+	$(top_builddir)/lib/cpp/libthrift.la \
+	$(BOOST_TEST_LDADD)
 
 #
 # AllProtocolsTest
@@ -203,15 +206,19 @@
 	AllProtocolTests.tcc \
 	GenericHelpers.h
 
-AllProtocolsTest_LDADD = libtestgencpp.la
+AllProtocolsTest_LDADD = \
+  libtestgencpp.la \
+  $(BOOST_TEST_LDADD)
 
 #
 # DebugProtoTest
 #
 DebugProtoTest_SOURCES = \
-	DebugProtoTest.cpp
+	DebugProtoTest.cpp 
 
-DebugProtoTest_LDADD = libtestgencpp.la
+DebugProtoTest_LDADD = \
+	libtestgencpp.la \
+	$(BOOST_TEST_LDADD)
 
 
 #
@@ -220,7 +227,9 @@
 JSONProtoTest_SOURCES = \
 	JSONProtoTest.cpp
 
-JSONProtoTest_LDADD = libtestgencpp.la
+JSONProtoTest_LDADD = \
+	libtestgencpp.la \
+	$(BOOST_TEST_LDADD)
 
 #
 # TNonblockingServerTest
@@ -240,7 +249,9 @@
 OptionalRequiredTest_SOURCES = \
 	OptionalRequiredTest.cpp
 
-OptionalRequiredTest_LDADD = libtestgencpp.la
+OptionalRequiredTest_LDADD = \
+	libtestgencpp.la \
+	$(BOOST_TEST_LDADD)
 
 #
 # OptionalRequiredTest
@@ -248,7 +259,19 @@
 RecursiveTest_SOURCES = \
 	RecursiveTest.cpp
 
-RecursiveTest_LDADD = libtestgencpp.la
+RecursiveTest_LDADD = \
+	libtestgencpp.la \
+	$(BOOST_TEST_LDADD)
+
+#
+# DenseProtoTest
+#
+DenseProtoTest_SOURCES = \
+	DenseProtoTest.cpp
+
+DenseProtoTest_LDADD = \
+	libtestgencpp.la \
+	$(BOOST_TEST_LDADD)
 
 #
 # SpecializationTest
@@ -256,7 +279,9 @@
 SpecializationTest_SOURCES = \
 	SpecializationTest.cpp
 
-SpecializationTest_LDADD = libtestgencpp.la
+SpecializationTest_LDADD = \
+	libtestgencpp.la \
+	$(BOOST_TEST_LDADD)
 
 concurrency_test_SOURCES = \
 	concurrency/Tests.cpp \
@@ -331,7 +356,6 @@
 	$(RM) -r gen-cpp
 
 EXTRA_DIST = \
-	DenseProtoTest.cpp \
 	ThriftTest_extras.cpp \
 	DebugProtoTest_extras.cpp \
 	concurrency \
diff --git a/lib/cpp/test/OptionalRequiredTest.cpp b/lib/cpp/test/OptionalRequiredTest.cpp
index 3f60754..b0e5ef7 100644
--- a/lib/cpp/test/OptionalRequiredTest.cpp
+++ b/lib/cpp/test/OptionalRequiredTest.cpp
@@ -21,18 +21,15 @@
  * details.
  */
 
-#include <cassert>
 #include <map>
-#include <iostream>
 #include <thrift/protocol/TDebugProtocol.h>
 #include <thrift/protocol/TBinaryProtocol.h>
 #include <thrift/transport/TBufferTransports.h>
 #include "gen-cpp/OptionalRequiredTest_types.h"
 
-using std::cout;
-using std::endl;
-using std::map;
-using std::string;
+#define BOOST_TEST_MODULE OptionalRequiredTest
+#include <boost/test/unit_test.hpp>
+
 using namespace thrift::test;
 using namespace apache::thrift;
 using namespace apache::thrift::transport;
@@ -49,7 +46,7 @@
   } catch (TProtocolException & ex) {
     worked = false;
   }
-  assert(worked == should_work);
+  BOOST_CHECK(worked == should_work);
 }
 */
 
@@ -60,219 +57,330 @@
   r.read(&protocol);
 }
 
-int main() {
+BOOST_AUTO_TEST_CASE(test_optional_required_1) {
+  OldSchool o;
 
-  cout << "This old school struct should have three fields." << endl;
-  {
-    OldSchool o;
-    cout << ThriftDebugString(o) << endl;
-  }
-  cout << endl;
+  const std::string expected_result(
+    "OldSchool {\n"
+    "  01: im_int (i16) = 0,\n"
+    "  02: im_str (string) = \"\",\n"
+    "  03: im_big (list) = list<map>[0] {\n"
+    "  },\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(o));
 
-  cout << "Setting a value before setting isset." << endl;
-  {
-    Simple s;
-    cout << ThriftDebugString(s) << endl;
-    s.im_optional = 10;
-    cout << ThriftDebugString(s) << endl;
-    s.__isset.im_optional = true;
-    cout << ThriftDebugString(s) << endl;
-  }
-  cout << endl;
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
 
-  cout << "Setting isset before setting a value." << endl;
-  {
-    Simple s;
-    cout << ThriftDebugString(s) << endl;
-    s.__isset.im_optional = true;
-    cout << ThriftDebugString(s) << endl;
-    s.im_optional = 10;
-    cout << ThriftDebugString(s) << endl;
-  }
-  cout << endl;
+BOOST_AUTO_TEST_CASE(test_optional_required_2_1) {
+  Simple s;
 
+  const std::string expected_result(
+    "Simple {\n"
+    "  01: im_default (i16) = 0,\n"
+    "  02: im_required (i16) = 0,\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(s));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_2_2) {
+  Simple s;
+  s.im_optional = 10;
+
+  const std::string expected_result(
+    "Simple {\n"
+    "  01: im_default (i16) = 0,\n"
+    "  02: im_required (i16) = 0,\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(s));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_2_3) {
+  Simple s;
+  s.im_optional = 10;
+  s.__isset.im_optional = true;
+
+  const std::string expected_result(
+    "Simple {\n"
+    "  01: im_default (i16) = 0,\n"
+    "  02: im_required (i16) = 0,\n"
+    "  03: im_optional (i16) = 10,\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(s));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_2_4) {
+  Simple s;
+  s.__isset.im_optional = true;
+
+  const std::string expected_result(
+    "Simple {\n"
+    "  01: im_default (i16) = 0,\n"
+    "  02: im_required (i16) = 0,\n"
+    "  03: im_optional (i16) = 0,\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(s));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_2_5) {
+  Simple s;
+  s.__isset.im_optional = true;
+  s.im_optional = 10;
+
+  const std::string expected_result(
+    "Simple {\n"
+    "  01: im_default (i16) = 0,\n"
+    "  02: im_required (i16) = 0,\n"
+    "  03: im_optional (i16) = 10,\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(s));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_3) {
   // assign/copy-construct with non-required fields
-  {
-    Simple s1, s2;
-    s1.__isset.im_default = true;
-    s1.__set_im_optional(10);
-    assert(s1.__isset.im_default);
-    assert(s1.__isset.im_optional);
 
-    s2 = s1;
+  Simple s1, s2;
+  s1.__isset.im_default = true;
+  s1.__set_im_optional(10);
+  BOOST_CHECK(s1.__isset.im_default);
+  BOOST_CHECK(s1.__isset.im_optional);
 
-    assert(s2.__isset.im_default);
-    assert(s2.__isset.im_optional);
+  s2 = s1;
 
-    Simple s3(s1);
+  BOOST_CHECK(s2.__isset.im_default);
+  BOOST_CHECK(s2.__isset.im_optional);
 
-    assert(s3.__isset.im_default);
-    assert(s3.__isset.im_optional);
-  }
+  Simple s3(s1);
 
+  BOOST_CHECK(s3.__isset.im_default);
+  BOOST_CHECK(s3.__isset.im_optional);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_4) {
   // Write-to-read with optional fields.
-  {
-    Simple s1, s2, s3;
-    s1.im_optional = 10;
-    assert(!s1.__isset.im_default);
-    // assert(!s1.__isset.im_required);  // Compile error.
-    assert(!s1.__isset.im_optional);
 
-    write_to_read(s1, s2);
+  Simple s1, s2, s3;
+  s1.im_optional = 10;
+  BOOST_CHECK(!s1.__isset.im_default);
+  // BOOST_CHECK(!s1.__isset.im_required);  // Compile error.
+  BOOST_CHECK(!s1.__isset.im_optional);
 
-    assert(s2.__isset.im_default);
-    // assert( s2.__isset.im_required);  // Compile error.
-    assert(!s2.__isset.im_optional);
-    assert(s3.im_optional == 0);
+  write_to_read(s1, s2);
 
-    s1.__isset.im_optional = true;
-    write_to_read(s1, s3);
+  BOOST_CHECK(s2.__isset.im_default);
+  // BOOST_CHECK( s2.__isset.im_required);  // Compile error.
+  BOOST_CHECK(!s2.__isset.im_optional);
+  BOOST_CHECK(s3.im_optional == 0);
 
-    assert(s3.__isset.im_default);
-    // assert( s3.__isset.im_required);  // Compile error.
-    assert(s3.__isset.im_optional);
-    assert(s3.im_optional == 10);
-  }
+  s1.__isset.im_optional = true;
+  write_to_read(s1, s3);
 
+  BOOST_CHECK(s3.__isset.im_default);
+  // BOOST_CHECK( s3.__isset.im_required);  // Compile error.
+  BOOST_CHECK(s3.__isset.im_optional);
+  BOOST_CHECK(s3.im_optional == 10);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_5) {
   // Writing between optional and default.
-  {
-    Tricky1 t1;
-    Tricky2 t2;
 
-    t2.im_optional = 10;
-    write_to_read(t2, t1);
-    write_to_read(t1, t2);
-    assert(!t1.__isset.im_default);
-    assert(t2.__isset.im_optional);
-    assert(t1.im_default == t2.im_optional);
-    assert(t1.im_default == 0);
-  }
+  Tricky1 t1;
+  Tricky2 t2;
 
+  t2.im_optional = 10;
+  write_to_read(t2, t1);
+  write_to_read(t1, t2);
+  BOOST_CHECK(!t1.__isset.im_default);
+  BOOST_CHECK(t2.__isset.im_optional);
+  BOOST_CHECK(t1.im_default == t2.im_optional);
+  BOOST_CHECK(t1.im_default == 0);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_6) {
   // Writing between default and required.
-  {
-    Tricky1 t1;
-    Tricky3 t3;
-    write_to_read(t1, t3);
-    write_to_read(t3, t1);
-    assert(t1.__isset.im_default);
-  }
 
+  Tricky1 t1;
+  Tricky3 t3;
+  write_to_read(t1, t3);
+  write_to_read(t3, t1);
+  BOOST_CHECK(t1.__isset.im_default);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_7) {
   // Writing between optional and required.
-  {
-    Tricky2 t2;
-    Tricky3 t3;
-    t2.__isset.im_optional = true;
-    write_to_read(t2, t3);
-    write_to_read(t3, t2);
-  }
 
+  Tricky2 t2;
+  Tricky3 t3;
+  t2.__isset.im_optional = true;
+  write_to_read(t2, t3);
+  write_to_read(t3, t2);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_8) {
   // Mu-hu-ha-ha-ha!
-  {
-    Tricky2 t2;
-    Tricky3 t3;
-    try {
-      write_to_read(t2, t3);
-      abort();
-    } catch (const TProtocolException&) {
-    }
 
-    write_to_read(t3, t2);
-    assert(t2.__isset.im_optional);
+  Tricky2 t2;
+  Tricky3 t3;
+  try {
+    write_to_read(t2, t3);
+    abort();
+  } catch (const TProtocolException&) {
   }
 
-  cout << "Complex struct, simple test." << endl;
-  {
-    Complex c;
-    cout << ThriftDebugString(c) << endl;
-  }
+  write_to_read(t3, t2);
+  BOOST_CHECK(t2.__isset.im_optional);
+}
 
-  {
-    Tricky1 t1;
-    Tricky2 t2;
-    // Compile error.
-    //(void)(t1 == t2);
-  }
+BOOST_AUTO_TEST_CASE(test_optional_required_9) {
+  Complex c;
 
-  {
-    OldSchool o1, o2, o3;
-    assert(o1 == o2);
-    o1.im_int = o2.im_int = 10;
-    assert(o1 == o2);
-    o1.__isset.im_int = true;
-    o2.__isset.im_int = false;
-    assert(o1 == o2);
-    o1.im_int = 20;
-    o1.__isset.im_int = false;
-    assert(o1 != o2);
-    o1.im_int = 10;
-    assert(o1 == o2);
-    o1.im_str = o2.im_str = "foo";
-    assert(o1 == o2);
-    o1.__isset.im_str = o2.__isset.im_str = true;
-    assert(o1 == o2);
-    map<int32_t, string> mymap;
-    mymap[1] = "bar";
-    mymap[2] = "baz";
-    o1.im_big.push_back(map<int32_t, string>());
-    assert(o1 != o2);
-    o2.im_big.push_back(map<int32_t, string>());
-    assert(o1 == o2);
-    o2.im_big.push_back(mymap);
-    assert(o1 != o2);
-    o1.im_big.push_back(mymap);
-    assert(o1 == o2);
+  const std::string expected_result(
+    "Complex {\n"
+    "  01: cp_default (i16) = 0,\n"
+    "  02: cp_required (i16) = 0,\n"
+    "  04: the_map (map) = map<i16,struct>[0] {\n"
+    "  },\n"
+    "  05: req_simp (struct) = Simple {\n"
+    "    01: im_default (i16) = 0,\n"
+    "    02: im_required (i16) = 0,\n"
+    "  },\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(c));
 
-    TBinaryProtocol protocol(boost::shared_ptr<TTransport>(new TMemoryBuffer));
-    o1.write(&protocol);
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
 
-    o1.im_big.push_back(mymap);
-    mymap[3] = "qux";
-    o2.im_big.push_back(mymap);
-    assert(o1 != o2);
-    o1.im_big.back()[3] = "qux";
-    assert(o1 == o2);
+BOOST_AUTO_TEST_CASE(test_optional_required_10) {
+  Tricky1 t1;
+  Tricky2 t2;
+  // Compile error.
+  //(void)(t1 == t2);
+}
 
-    o3.read(&protocol);
-    o3.im_big.push_back(mymap);
-    assert(o1 == o3);
+BOOST_AUTO_TEST_CASE(test_optional_required_11) {
+  OldSchool o1, o2, o3;
+  BOOST_CHECK(o1 == o2);
+  o1.im_int = o2.im_int = 10;
+  BOOST_CHECK(o1 == o2);
+  o1.__isset.im_int = true;
+  o2.__isset.im_int = false;
+  BOOST_CHECK(o1 == o2);
+  o1.im_int = 20;
+  o1.__isset.im_int = false;
+  BOOST_CHECK(o1 != o2);
+  o1.im_int = 10;
+  BOOST_CHECK(o1 == o2);
+  o1.im_str = o2.im_str = "foo";
+  BOOST_CHECK(o1 == o2);
+  o1.__isset.im_str = o2.__isset.im_str = true;
+  BOOST_CHECK(o1 == o2);
+  std::map<int32_t, std::string> mymap;
+  mymap[1] = "bar";
+  mymap[2] = "baz";
+  o1.im_big.push_back(std::map<int32_t, std::string>());
+  BOOST_CHECK(o1 != o2);
+  o2.im_big.push_back(std::map<int32_t, std::string>());
+  BOOST_CHECK(o1 == o2);
+  o2.im_big.push_back(mymap);
+  BOOST_CHECK(o1 != o2);
+  o1.im_big.push_back(mymap);
+  BOOST_CHECK(o1 == o2);
 
-    // cout << ThriftDebugString(o3) << endl;
-  }
+  TBinaryProtocol protocol(boost::shared_ptr<TTransport>(new TMemoryBuffer));
+  o1.write(&protocol);
 
-  {
-    Tricky2 t1, t2;
-    assert(t1.__isset.im_optional == false);
-    assert(t2.__isset.im_optional == false);
-    assert(t1 == t2);
-    t1.im_optional = 5;
-    assert(t1 == t2);
-    t2.im_optional = 5;
-    assert(t1 == t2);
-    t1.__isset.im_optional = true;
-    assert(t1 != t2);
-    t2.__isset.im_optional = true;
-    assert(t1 == t2);
-    t1.im_optional = 10;
-    assert(t1 != t2);
-    t2.__isset.im_optional = false;
-    assert(t1 != t2);
-  }
+  o1.im_big.push_back(mymap);
+  mymap[3] = "qux";
+  o2.im_big.push_back(mymap);
+  BOOST_CHECK(o1 != o2);
+  o1.im_big.back()[3] = "qux";
+  BOOST_CHECK(o1 == o2);
+  
+  o3.read(&protocol);
+  o3.im_big.push_back(mymap);
+  BOOST_CHECK(o1 == o3);
 
-  {
-    OptionalDefault t1, t2;
-    cout << ThriftDebugString(t1) << endl;
-    assert(t1.__isset.opt_int == true);
-    assert(t1.__isset.opt_str == true);
-    assert(t1.opt_int == t2.opt_int);
-    assert(t1.opt_str == t2.opt_str);
+  const std::string expected_result(
+    "OldSchool {\n"
+    "  01: im_int (i16) = 10,\n"
+    "  02: im_str (string) = \"foo\",\n"
+    "  03: im_big (list) = list<map>[3] {\n"
+    "    [0] = map<i32,string>[0] {\n"
+    "    },\n"
+    "    [1] = map<i32,string>[2] {\n"
+    "      1 -> \"bar\",\n"
+    "      2 -> \"baz\",\n"
+    "    },\n"
+    "    [2] = map<i32,string>[3] {\n"
+    "      1 -> \"bar\",\n"
+    "      2 -> \"baz\",\n"
+    "      3 -> \"qux\",\n"
+    "    },\n"
+    "  },\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(o3));
 
-    write_to_read(t1, t2);
-    cout << ThriftDebugString(t2) << endl;
-    assert(t2.__isset.opt_int == true);
-    assert(t2.__isset.opt_str == true);
-    assert(t1.opt_int == t2.opt_int);
-    assert(t1.opt_str == t2.opt_str);
-  }
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
+}
 
-  return 0;
+BOOST_AUTO_TEST_CASE(test_optional_required_12) {
+  Tricky2 t1, t2;
+  BOOST_CHECK(t1.__isset.im_optional == false);
+  BOOST_CHECK(t2.__isset.im_optional == false);
+  BOOST_CHECK(t1 == t2);
+  t1.im_optional = 5;
+  BOOST_CHECK(t1 == t2);
+  t2.im_optional = 5;
+  BOOST_CHECK(t1 == t2);
+  t1.__isset.im_optional = true;
+  BOOST_CHECK(t1 != t2);
+  t2.__isset.im_optional = true;
+  BOOST_CHECK(t1 == t2);
+  t1.im_optional = 10;
+  BOOST_CHECK(t1 != t2);
+  t2.__isset.im_optional = false;
+  BOOST_CHECK(t1 != t2);
+}
+
+BOOST_AUTO_TEST_CASE(test_optional_required_13) {
+  OptionalDefault t1, t2;
+
+  BOOST_CHECK(t1.__isset.opt_int == true);
+  BOOST_CHECK(t1.__isset.opt_str == true);
+  BOOST_CHECK(t1.opt_int == t2.opt_int);
+  BOOST_CHECK(t1.opt_str == t2.opt_str);
+
+  write_to_read(t1, t2);
+  BOOST_CHECK(t2.__isset.opt_int == true);
+  BOOST_CHECK(t2.__isset.opt_str == true);
+  BOOST_CHECK(t1.opt_int == t2.opt_int);
+  BOOST_CHECK(t1.opt_str == t2.opt_str);
+
+  const std::string expected_result(
+    "OptionalDefault {\n"
+    "  01: opt_int (i16) = 1234,\n"
+    "  02: opt_str (string) = \"default\",\n"
+    "}");
+  const std::string result(apache::thrift::ThriftDebugString(t2));
+
+  BOOST_CHECK_MESSAGE(!expected_result.compare(result),
+    "Expected:\n" << expected_result << "\nGotten:\n" << result);
 }
diff --git a/lib/cpp/test/RecursiveTest.cpp b/lib/cpp/test/RecursiveTest.cpp
index 9a7eafe..e3e3f50 100644
--- a/lib/cpp/test/RecursiveTest.cpp
+++ b/lib/cpp/test/RecursiveTest.cpp
@@ -25,14 +25,17 @@
 #include <thrift/transport/TBufferTransports.h>
 #include <thrift/protocol/TBinaryProtocol.h>
 
+#define BOOST_TEST_MODULE RecursiveTest
+#include <boost/test/unit_test.hpp>
+
 using apache::thrift::transport::TMemoryBuffer;
 using apache::thrift::protocol::TBinaryProtocol;
 using boost::shared_ptr;
 
-int main() {
+BOOST_AUTO_TEST_CASE(test_recursive_1) {
   shared_ptr<TMemoryBuffer> buf(new TMemoryBuffer());
   shared_ptr<TBinaryProtocol> prot(new TBinaryProtocol(buf));
-
+  
   RecTree tree;
   RecTree child;
   tree.children.push_back(child);
@@ -41,8 +44,13 @@
 
   RecTree result;
   result.read(prot.get());
-  assert(tree == result);
+  BOOST_CHECK(tree == result);
+}
 
+BOOST_AUTO_TEST_CASE(test_recursive_2) {
+  shared_ptr<TMemoryBuffer> buf(new TMemoryBuffer());
+  shared_ptr<TBinaryProtocol> prot(new TBinaryProtocol(buf));
+  
   RecList l;
   boost::shared_ptr<RecList> l2(new RecList);
   l.nextitem = l2;
@@ -51,8 +59,13 @@
 
   RecList resultlist;
   resultlist.read(prot.get());
-  assert(resultlist.nextitem != NULL);
-  assert(resultlist.nextitem->nextitem == NULL);
+  BOOST_CHECK(resultlist.nextitem != NULL);
+  BOOST_CHECK(resultlist.nextitem->nextitem == NULL);
+}
+
+BOOST_AUTO_TEST_CASE(test_recursive_3) {
+  shared_ptr<TMemoryBuffer> buf(new TMemoryBuffer());
+  shared_ptr<TBinaryProtocol> prot(new TBinaryProtocol(buf));
 
   CoRec c;
   boost::shared_ptr<CoRec2> r(new CoRec2);
@@ -61,15 +74,18 @@
   c.write(prot.get());
 
   c.read(prot.get());
-  assert(c.other != NULL);
-  assert(c.other->other.other == NULL);
+  BOOST_CHECK(c.other != NULL);
+  BOOST_CHECK(c.other->other.other == NULL);
+}
+
+BOOST_AUTO_TEST_CASE(test_recursive_4) {
+  shared_ptr<TMemoryBuffer> buf(new TMemoryBuffer());
+  shared_ptr<TBinaryProtocol> prot(new TBinaryProtocol(buf));
 
   boost::shared_ptr<RecList> depthLimit(new RecList);
   depthLimit->nextitem = depthLimit;
-  try {
-    depthLimit->write(prot.get());
-    assert(false);
-  } catch (const apache::thrift::protocol::TProtocolException& e) {
-  }
+  BOOST_CHECK_THROW(depthLimit->write(prot.get()),
+    apache::thrift::protocol::TProtocolException);
+
   depthLimit->nextitem.reset();
 }
diff --git a/lib/cpp/test/SpecializationTest.cpp b/lib/cpp/test/SpecializationTest.cpp
index 856bdac..e851bac 100644
--- a/lib/cpp/test/SpecializationTest.cpp
+++ b/lib/cpp/test/SpecializationTest.cpp
@@ -1,21 +1,20 @@
 #define _USE_MATH_DEFINES
-#include <iostream>
 #include <cmath>
 #include <thrift/transport/TTransportUtils.h>
 #include <thrift/protocol/TBinaryProtocol.h>
 #include <gen-cpp/DebugProtoTest_types.h>
 
-using std::cout;
-using std::endl;
 using namespace thrift::test::debug;
 using namespace apache::thrift::transport;
 using namespace apache::thrift::protocol;
 
+#define BOOST_TEST_MODULE SpecializationTest
+#include <boost/test/unit_test.hpp>
+
 typedef TBinaryProtocolT<TMemoryBuffer> MyProtocol;
 // typedef TBinaryProtocolT<TTransport> MyProtocol;
 
-int main() {
-
+BOOST_AUTO_TEST_CASE(test_specialization_1) {
   OneOfEach ooe;
   ooe.im_true = true;
   ooe.im_false = false;
@@ -35,9 +34,11 @@
   n.my_ooe.integer64 = 64;
   n.my_ooe.double_precision = (std::sqrt(5.0) + 1) / 2;
   n.my_ooe.some_characters = ":R (me going \"rrrr\")";
-  n.my_ooe.zomg_unicode     = "\xd3\x80\xe2\x85\xae\xce\x9d\x20"
-                              "\xd0\x9d\xce\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0\xb0\xcf\x81\xe2\x84\x8e"
-                              "\x20\xce\x91\x74\x74\xce\xb1\xe2\x85\xbd\xce\xba\xc7\x83\xe2\x80\xbc";
+  n.my_ooe.zomg_unicode     = "\xd3\x80\xe2\x85\xae\xce\x9d\x20\xd0\x9d\xce"
+                              "\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0"
+                              "\xb0\xcf\x81\xe2\x84\x8e\x20\xce\x91\x74\x74"
+                              "\xce\xb1\xe2\x85\xbd\xce\xba\xc7\x83\xe2\x80"
+                              "\xbc";
   n.my_bonk.type = 31337;
   n.my_bonk.message = "I am a bonk... xor!";
 
@@ -84,25 +85,19 @@
   boost::shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
   boost::shared_ptr<TProtocol> proto(new MyProtocol(buffer));
 
-  cout << "Testing ooe" << endl;
-
   ooe.write(proto.get());
   OneOfEach ooe2;
   ooe2.read(proto.get());
 
-  assert(ooe == ooe2);
-
-  cout << "Testing hm" << endl;
+  BOOST_CHECK(ooe == ooe2);
 
   hm.write(proto.get());
   HolyMoley hm2;
   hm2.read(proto.get());
 
-  assert(hm == hm2);
+  BOOST_CHECK(hm == hm2);
 
   hm2.big[0].a_bite = 0x00;
 
-  assert(hm != hm2);
-
-  return 0;
+  BOOST_CHECK(hm != hm2);
 }
diff --git a/lib/cpp/test/TFDTransportTest.cpp b/lib/cpp/test/TFDTransportTest.cpp
index edbc55a..0ba035a 100644
--- a/lib/cpp/test/TFDTransportTest.cpp
+++ b/lib/cpp/test/TFDTransportTest.cpp
@@ -19,42 +19,32 @@
 
 #include <cstdlib>
 #include <stdexcept>
-#include <iostream>
 #include <thrift/Thrift.h>
 #include <thrift/transport/TFDTransport.h>
-using apache::thrift::transport::TTransportException;
-using apache::thrift::transport::TFDTransport;
 
-class DummyException : std::exception {};
-
-int main() {
-  { TFDTransport t(256, TFDTransport::NO_CLOSE_ON_DESTROY); }
+#define BOOST_TEST_MODULE TFDTransportTest
+#include <boost/test/unit_test.hpp>
 
 // Disabled on MSVC because the RTL asserts on an invalid file descriptor
 // in both debug and release mode; at least in MSVCR100 (Visual Studio 2010)
 #if !defined(WIN32)
-  try {
-    {
-      TFDTransport t(256, TFDTransport::CLOSE_ON_DESTROY);
-      t.close();
-    }
-    std::cout << "NOT OK 0!" << std::endl;
-    std::abort();
-  } catch (TTransportException) {
-    std::cout << "OK!" << std::endl;
-  }
 
-  try {
-    {
-      TFDTransport t(256, TFDTransport::CLOSE_ON_DESTROY);
-      throw DummyException();
-    }
-    std::abort();
-  } catch (TTransportException&) {
-    std::abort();
-  } catch (DummyException&) {
-  }
-#endif
+using apache::thrift::transport::TTransportException;
+using apache::thrift::transport::TFDTransport;
 
-  return 0;
+BOOST_AUTO_TEST_CASE(test_tfdtransport_1) {
+  BOOST_CHECK_NO_THROW(TFDTransport t(256, TFDTransport::CLOSE_ON_DESTROY));
 }
+
+BOOST_AUTO_TEST_CASE(test_tfdtransport_2) {
+  TFDTransport t(256, TFDTransport::CLOSE_ON_DESTROY);
+  BOOST_CHECK_THROW(t.close(), TTransportException);
+}
+
+#else
+
+BOOST_AUTO_TEST_CASE(test_tfdtransport_dummy) {
+  BOOST_CHECK(true);
+}
+
+#endif
diff --git a/lib/cpp/test/TMemoryBufferTest.cpp b/lib/cpp/test/TMemoryBufferTest.cpp
index b562b34..492eead 100644
--- a/lib/cpp/test/TMemoryBufferTest.cpp
+++ b/lib/cpp/test/TMemoryBufferTest.cpp
@@ -20,7 +20,6 @@
 #include <boost/test/auto_unit_test.hpp>
 #include <iostream>
 #include <climits>
-#include <cassert>
 #include <vector>
 #include <thrift/transport/TBufferTransports.h>
 #include <thrift/protocol/TBinaryProtocol.h>
@@ -77,7 +76,7 @@
   thrift::test::Xtruct a2;
   a2.read(binaryProtcol2.get());
 
-  assert(a == a2);
+  BOOST_CHECK(a == a2);
 }
 
 BOOST_AUTO_TEST_CASE(test_copy) {
@@ -90,16 +89,16 @@
   string* str2 = new string("plsreuse");
   bool obj_reuse = (str1 == str2);
   bool dat_reuse = (data1 == str2->data());
-  cout << "Object reuse: " << obj_reuse << "   Data reuse: " << dat_reuse
-       << ((obj_reuse && dat_reuse) ? "   YAY!" : "") << endl;
+  BOOST_MESSAGE("Object reuse: " << obj_reuse << "   Data reuse: " << dat_reuse
+                << ((obj_reuse && dat_reuse) ? "   YAY!" : ""));
   delete str2;
 
   string str3 = "wxyz", str4 = "6789";
   buf.readAppendToString(str3, 4);
   buf.readAppendToString(str4, INT_MAX);
 
-  assert(str3 == "wxyzabcd");
-  assert(str4 == "67891234");
+  BOOST_CHECK(str3 == "wxyzabcd");
+  BOOST_CHECK(str4 == "67891234");
 }
 
 BOOST_AUTO_TEST_CASE(test_exceptions) {
@@ -107,20 +106,14 @@
 
   TMemoryBuffer buf1((uint8_t*)data, 7, TMemoryBuffer::OBSERVE);
   string str = buf1.getBufferAsString();
-  assert(str.length() == 7);
+  BOOST_CHECK(str.length() == 7);
+
   buf1.resetBuffer();
-  try {
-    buf1.write((const uint8_t*)"foo", 3);
-    assert(false);
-  } catch (TTransportException&) {
-  }
+
+  BOOST_CHECK_THROW(buf1.write((const uint8_t*)"foo", 3), TTransportException);
 
   TMemoryBuffer buf2((uint8_t*)data, 7, TMemoryBuffer::COPY);
-  try {
-    buf2.write((const uint8_t*)"bar", 3);
-  } catch (TTransportException&) {
-    assert(false);
-  }
+  BOOST_CHECK_NO_THROW(buf2.write((const uint8_t*)"bar", 3));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/lib/cpp/test/TPipedTransportTest.cpp b/lib/cpp/test/TPipedTransportTest.cpp
index 53a6fb5..a2ec81e 100644
--- a/lib/cpp/test/TPipedTransportTest.cpp
+++ b/lib/cpp/test/TPipedTransportTest.cpp
@@ -17,17 +17,18 @@
  * under the License.
  */
 
-#include <cstdlib>
-#include <stdexcept>
 #include <thrift/Thrift.h>
 #include <thrift/transport/TTransportUtils.h>
 #include <thrift/transport/TBufferTransports.h>
-using namespace std;
+
+#define BOOST_TEST_MODULE TPipedTransportTest
+#include <boost/test/unit_test.hpp>
+
 using apache::thrift::transport::TTransportException;
 using apache::thrift::transport::TPipedTransport;
 using apache::thrift::transport::TMemoryBuffer;
 
-int main() {
+BOOST_AUTO_TEST_CASE(test_tpipedtransport_1) {
   boost::shared_ptr<TMemoryBuffer> underlying(new TMemoryBuffer);
   boost::shared_ptr<TMemoryBuffer> pipe(new TMemoryBuffer);
   boost::shared_ptr<TPipedTransport> trans(new TPipedTransport(underlying, pipe));
@@ -36,17 +37,15 @@
 
   underlying->write((uint8_t*)"abcd", 4);
   trans->readAll(buffer, 2);
-  assert(string((char*)buffer, 2) == "ab");
+  BOOST_CHECK(std::string((char*)buffer, 2) == "ab");
   trans->readEnd();
-  assert(pipe->getBufferAsString() == "ab");
+  BOOST_CHECK(pipe->getBufferAsString() == "ab");
   pipe->resetBuffer();
   underlying->write((uint8_t*)"ef", 2);
   trans->readAll(buffer, 2);
-  assert(string((char*)buffer, 2) == "cd");
+  BOOST_CHECK(std::string((char*)buffer, 2) == "cd");
   trans->readAll(buffer, 2);
-  assert(string((char*)buffer, 2) == "ef");
+  BOOST_CHECK(std::string((char*)buffer, 2) == "ef");
   trans->readEnd();
-  assert(pipe->getBufferAsString() == "cdef");
-
-  return 0;
+  BOOST_CHECK(pipe->getBufferAsString() == "cdef");
 }
