geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [02/23] geode-native git commit: GEODE-2741: Code cleanup to move to std::shared_ptr
Date Tue, 06 Jun 2017 17:56:28 GMT
http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/test/DataInputTest.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/test/DataInputTest.cpp b/src/cppcache/test/DataInputTest.cpp
index 40a63ba..8c8913c 100644
--- a/src/cppcache/test/DataInputTest.cpp
+++ b/src/cppcache/test/DataInputTest.cpp
@@ -90,19 +90,19 @@ class TestDataInput {
 
   void readDouble(double *value) { m_dataInput.readDouble(value); }
 
-  void readASCII(char **value, uint16_t *len = NULL) {
+  void readASCII(char **value, uint16_t *len = nullptr) {
     m_dataInput.readASCII(value, len);
   }
 
-  void readASCIIHuge(char **value, uint32_t *len = NULL) {
+  void readASCIIHuge(char **value, uint32_t *len = nullptr) {
     m_dataInput.readASCIIHuge(value, len);
   }
 
-  void readUTF(char **value, uint16_t *len = NULL) {
+  void readUTF(char **value, uint16_t *len = nullptr) {
     m_dataInput.readUTF(value, len);
   }
 
-  void readUTFHuge(char **value, uint32_t *len = NULL) {
+  void readUTFHuge(char **value, uint32_t *len = nullptr) {
     m_dataInput.readUTFHuge(value, len);
   }
 
@@ -110,11 +110,11 @@ class TestDataInput {
     m_dataInput.readUTFNoLen(value, decodedLen);
   }
 
-  void readUTF(wchar_t **value, uint16_t *len = NULL) {
+  void readUTF(wchar_t **value, uint16_t *len = nullptr) {
     m_dataInput.readUTF(value, len);
   }
 
-  void readUTFHuge(wchar_t **value, uint32_t *len = NULL) {
+  void readUTFHuge(wchar_t **value, uint32_t *len = nullptr) {
     m_dataInput.readUTFHuge(value, len);
   }
 
@@ -427,10 +427,10 @@ TEST_F(DataInputTest, TestReadInt8_tBytesOnly) {
 
 TEST_F(DataInputTest, TestReadUint8_tBytes) {
   TestDataInput dataInput("04BABEFACE");
-  uint8_t *buffer = NULL;
+  uint8_t *buffer = nullptr;
   int32_t len = 0;
   dataInput.readBytes(&buffer, &len);
-  EXPECT_NE((uint8_t *)NULL, buffer) << "Non-null buffer";
+  EXPECT_NE((uint8_t *)nullptr, buffer) << "Non-null buffer";
   ASSERT_EQ(4, len) << "Correct length";
   EXPECT_EQ((uint8_t)186U, buffer[0]) << "Correct zeroth uint8_t";
   EXPECT_EQ((uint8_t)190U, buffer[1]) << "Correct first uint8_t";
@@ -441,10 +441,10 @@ TEST_F(DataInputTest, TestReadUint8_tBytes) {
 
 TEST_F(DataInputTest, TestReadInt8_tBytes) {
   TestDataInput dataInput("04DEADBEEF");
-  int8_t *buffer = NULL;
+  int8_t *buffer = nullptr;
   int32_t len = 0;
   dataInput.readBytes(&buffer, &len);
-  EXPECT_NE((int8_t *)NULL, buffer) << "Non-null buffer";
+  EXPECT_NE((int8_t *)nullptr, buffer) << "Non-null buffer";
   ASSERT_EQ(4, len) << "Correct length";
   EXPECT_EQ((int8_t)-34, buffer[0]) << "Correct zeroth int8_t";
   EXPECT_EQ((int8_t)-83, buffer[1]) << "Correct first int8_t";
@@ -551,7 +551,7 @@ TEST_F(DataInputTest, TestReadDouble) {
 TEST_F(DataInputTest, TestReadASCII) {
   TestDataInput dataInput(
       "001B596F7520686164206D65206174206D65617420746F726E61646F2E");
-  char *value = NULL;
+  char *value = nullptr;
   uint16_t len = 0U;
   dataInput.readASCII(&value, &len);
   ASSERT_EQ((uint16_t)27U, len) << "Correct length";
@@ -562,7 +562,7 @@ TEST_F(DataInputTest, TestReadASCII) {
 TEST_F(DataInputTest, TestReadASCIIHuge) {
   TestDataInput dataInput(
       "0000001B596F7520686164206D65206174206D65617420746F726E61646F2E");
-  char *value = NULL;
+  char *value = nullptr;
   uint32_t len = 0U;
   dataInput.readASCIIHuge(&value, &len);
   ASSERT_EQ((uint32_t)27U, len) << "Correct length";
@@ -573,7 +573,7 @@ TEST_F(DataInputTest, TestReadASCIIHuge) {
 TEST_F(DataInputTest, TestReadUTFNarrow) {
   TestDataInput dataInput(
       "001B596F7520686164206D65206174206D65617420746F726E61646F2E");
-  char *value = NULL;
+  char *value = nullptr;
   uint16_t len = 0U;
   dataInput.readUTF(&value, &len);
   ASSERT_EQ((uint16_t)27U, len) << "Correct length";
@@ -585,7 +585,7 @@ TEST_F(DataInputTest, TestReadUTFHugeNarrow) {
   TestDataInput dataInput(
       "0000001B0059006F007500200068006100640020006D00650020006100740020006D0065"
       "0061007400200074006F0072006E00610064006F002E");
-  char *value = NULL;
+  char *value = nullptr;
   uint32_t len = 0U;
   dataInput.readUTFHuge(&value, &len);
   ASSERT_EQ((uint32_t)27U, len) << "Correct length";
@@ -596,7 +596,7 @@ TEST_F(DataInputTest, TestReadUTFHugeNarrow) {
 TEST_F(DataInputTest, TestReadUTFNoLen) {
   TestDataInput dataInput(
       "596F7520686164206D65206174206D65617420746F726E61646F2E");
-  wchar_t *value = NULL;
+  wchar_t *value = nullptr;
   dataInput.readUTFNoLen(&value, static_cast<uint16_t>(27U));
   EXPECT_STREQ(L"You had me at meat tornado.", value) << "Correct wchar_t *";
   DataInput::freeUTFMemory(value);
@@ -605,7 +605,7 @@ TEST_F(DataInputTest, TestReadUTFNoLen) {
 TEST_F(DataInputTest, TestReadUTFWide) {
   TestDataInput dataInput(
       "001B596F7520686164206D65206174206D65617420746F726E61646F2E");
-  wchar_t *value = NULL;
+  wchar_t *value = nullptr;
   uint16_t len = 0U;
   dataInput.readUTF(&value, &len);
   ASSERT_EQ((uint16_t)27U, len) << "Correct length";
@@ -617,7 +617,7 @@ TEST_F(DataInputTest, TestReadUTFHugeWide) {
   TestDataInput dataInput(
       "0000001B0059006F007500200068006100640020006D00650020006100740020006D0065"
       "0061007400200074006F0072006E00610064006F002E");
-  wchar_t *value = NULL;
+  wchar_t *value = nullptr;
   uint32_t len = 0U;
   dataInput.readUTFHuge(&value, &len);
   ASSERT_EQ((uint32_t)27U, len) << "Correct length";
@@ -685,7 +685,7 @@ TEST_F(DataInputTest, TestReadCharArray) {
   TestDataInput dataInput(
       "1C0059006F007500200068006100640020006D00650020006100740020006D0065006100"
       "7400200074006F0072006E00610064006F002E0000");
-  char *value = NULL;
+  char *value = nullptr;
   int32_t length = 0;
   dataInput.readCharArray(&value, length);
   ASSERT_EQ((int32_t)28, length) << "Correct length";
@@ -696,7 +696,7 @@ TEST_F(DataInputTest, TestReadCharArray) {
 TEST_F(DataInputTest, TestReadString) {
   TestDataInput dataInput(
       "57001B596F7520686164206D65206174206D65617420746F726E61646F2E");
-  char *value = NULL;
+  char *value = nullptr;
   dataInput.readString(&value);
   EXPECT_STREQ("You had me at meat tornado.", value) << "Correct char *";
   DataInput::freeUTFMemory(value);
@@ -705,7 +705,7 @@ TEST_F(DataInputTest, TestReadString) {
 TEST_F(DataInputTest, TestReadWideString) {
   TestDataInput dataInput(
       "57001B596F7520686164206D65206174206D65617420746F726E61646F2E");
-  wchar_t *value = NULL;
+  wchar_t *value = nullptr;
   dataInput.readWideString(&value);
   EXPECT_STREQ(L"You had me at meat tornado.", value) << "Correct wchar_t *";
   DataInput::freeUTFMemory(value);
@@ -714,7 +714,7 @@ TEST_F(DataInputTest, TestReadWideString) {
 TEST_F(DataInputTest, TestReadStringArray) {
   TestDataInput dataInput(
       "0157001B596F7520686164206D65206174206D65617420746F726E61646F2E");
-  char **value = NULL;
+  char **value = nullptr;
   int32_t length = 0;
   dataInput.readStringArray(&value, length);
   ASSERT_EQ((int32_t)1, length) << "Correct length";
@@ -726,7 +726,7 @@ TEST_F(DataInputTest, TestReadStringArray) {
 TEST_F(DataInputTest, TestReadWideStringArray) {
   TestDataInput dataInput(
       "0157001B596F7520686164206D65206174206D65617420746F726E61646F2E");
-  wchar_t **value = NULL;
+  wchar_t **value = nullptr;
   int32_t length = 0;
   dataInput.readWideStringArray(&value, length);
   ASSERT_EQ((int32_t)1, length) << "Correct length";
@@ -737,15 +737,15 @@ TEST_F(DataInputTest, TestReadWideStringArray) {
 
 TEST_F(DataInputTest, TestReadArrayOfByteArrays) {
   TestDataInput dataInput("0104DEADBEEF");
-  int8_t **arrayOfByteArrays = NULL;
+  int8_t **arrayOfByteArrays = nullptr;
   int32_t arrayLength = 0;
-  int32_t *elementLength = NULL;
+  int32_t *elementLength = nullptr;
   dataInput.readArrayOfByteArrays(&arrayOfByteArrays, arrayLength,
                                   &elementLength);
-  EXPECT_NE((int8_t **)NULL, arrayOfByteArrays)
+  EXPECT_NE((int8_t **)nullptr, arrayOfByteArrays)
       << "Non-null array of byte arrays";
   ASSERT_EQ((int32_t)1, arrayLength) << "Correct array length";
-  EXPECT_NE((int8_t *)NULL, arrayOfByteArrays[0])
+  EXPECT_NE((int8_t *)nullptr, arrayOfByteArrays[0])
       << "Non-null first byte array";
   ASSERT_EQ(4, elementLength[0]) << "Correct length";
   EXPECT_EQ((int8_t)-34, arrayOfByteArrays[0][0]) << "Correct zeroth int8_t";
@@ -877,10 +877,10 @@ TEST_F(DataInputTest, TestSetBuffer) {
 TEST_F(DataInputTest, TestSetPoolName) {
   static const char *poolName = "Das Schwimmbad";
   TestDataInput dataInput("123456789ABCDEF0");
-  EXPECT_EQ((const char *)NULL, dataInput.getPoolName())
+  EXPECT_EQ((const char *)nullptr, dataInput.getPoolName())
       << "Null pool name before setting";
   dataInput.setPoolName(poolName);
-  EXPECT_NE((const char *)NULL, dataInput.getPoolName())
+  EXPECT_NE((const char *)nullptr, dataInput.getPoolName())
       << "Non-null pool name after setting";
   EXPECT_STREQ(poolName, dataInput.getPoolName())
       << "Correct pool name after setting";

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/test/DataOutputTest.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/test/DataOutputTest.cpp b/src/cppcache/test/DataOutputTest.cpp
index f397b22..214ec93 100644
--- a/src/cppcache/test/DataOutputTest.cpp
+++ b/src/cppcache/test/DataOutputTest.cpp
@@ -28,13 +28,13 @@ using namespace apache::geode::client;
 
 class TestDataOutput : public DataOutput {
  public:
-  TestDataOutput() : m_byteArray(NULL) {
+  TestDataOutput() : m_byteArray(nullptr) {
     // NOP
   }
 
   virtual ~TestDataOutput() {
     delete m_byteArray;
-    m_byteArray = NULL;
+    m_byteArray = nullptr;
   }
 
   const ByteArray& getByteArray() const {
@@ -307,7 +307,8 @@ TEST_F(DataOutputTest, TestCursorAdvance) {
 
   const uint32_t originalLength = dataOutput.getBufferLength();
   dataOutput.advanceCursor(2);
-  EXPECT_EQ((originalLength + 2), dataOutput.getBufferLength()) << "Correct length
after advance";
+  EXPECT_EQ((originalLength + 2), dataOutput.getBufferLength())
+      << "Correct length after advance";
 }
 
 TEST_F(DataOutputTest, TestCursorNegativeAdvance) {
@@ -319,5 +320,6 @@ TEST_F(DataOutputTest, TestCursorNegativeAdvance) {
 
   const uint32_t originalLength = dataOutput.getBufferLength();
   dataOutput.advanceCursor(-2);
-  EXPECT_EQ((originalLength - 2), dataOutput.getBufferLength()) << "Correct length
after negative advance";
+  EXPECT_EQ((originalLength - 2), dataOutput.getBufferLength())
+      << "Correct length after negative advance";
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/test/TcrMessage_unittest.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/test/TcrMessage_unittest.cpp b/src/cppcache/test/TcrMessage_unittest.cpp
index ed582a9..d58a6af 100644
--- a/src/cppcache/test/TcrMessage_unittest.cpp
+++ b/src/cppcache/test/TcrMessage_unittest.cpp
@@ -41,16 +41,16 @@ class TcrMessageTest : public ::testing::Test, protected ByteArrayFixture
{
 };
 
 TEST_F(TcrMessageTest, intializeDefaultConstructor) {
-  TcrMessageReply message(true, NULL);
+  TcrMessageReply message(true, nullptr);
 
   EXPECT_EQ(TcrMessage::INVALID, message.getMessageType());
 }
 
 TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithDESTROY_REGION) {
-  const Region *region = NULL;
-  const UserDataPtr aCallbackArgument = NULL;
+  const Region *region = nullptr;
+  const UserDataPtr aCallbackArgument = nullptr;
   int messageResponseTimeout = 1000;
-  ThinClientBaseDM *connectionDM = NULL;
+  ThinClientBaseDM *connectionDM = nullptr;
 
   TcrMessageDestroyRegion message(region, aCallbackArgument,
                                   messageResponseTimeout, connectionDM);
@@ -65,10 +65,10 @@ TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithDESTROY_REGION)
{
 }
 
 TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithCLEAR_REGION) {
-  const Region *region = NULL;
-  const UserDataPtr aCallbackArgument = NULL;
+  const Region *region = nullptr;
+  const UserDataPtr aCallbackArgument = nullptr;
   int messageResponseTimeout = 1000;
-  ThinClientBaseDM *connectionDM = NULL;
+  ThinClientBaseDM *connectionDM = nullptr;
 
   TcrMessageClearRegion message(region, aCallbackArgument,
                                 messageResponseTimeout, connectionDM);
@@ -82,7 +82,7 @@ TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithCLEAR_REGION)
{
 
 TEST_F(TcrMessageTest, testQueryConstructorMessageDataCotent) {
   int messageResponseTimeout = 1000;
-  ThinClientBaseDM *connectionDM = NULL;
+  ThinClientBaseDM *connectionDM = nullptr;
 
   TcrMessageCloseCQ message("myRegionName", messageResponseTimeout,
                             connectionDM);
@@ -97,7 +97,7 @@ TEST_F(TcrMessageTest, testQueryConstructorMessageDataCotent) {
 
 TEST_F(TcrMessageTest, testQueryConstructorWithQUERY) {
   int messageResponseTimeout = 1000;
-  ThinClientBaseDM *connectionDM = NULL;
+  ThinClientBaseDM *connectionDM = nullptr;
 
   TcrMessageQuery message("aRegionName", messageResponseTimeout, connectionDM);
 
@@ -111,7 +111,7 @@ TEST_F(TcrMessageTest, testQueryConstructorWithQUERY) {
 
 TEST_F(TcrMessageTest, testQueryConstructorWithSTOPCQ_MSG_TYPE) {
   int messageResponseTimeout = 1000;
-  ThinClientBaseDM *connectionDM = NULL;
+  ThinClientBaseDM *connectionDM = nullptr;
 
   TcrMessageStopCQ message("aRegionName", messageResponseTimeout, connectionDM);
 
@@ -125,7 +125,7 @@ TEST_F(TcrMessageTest, testQueryConstructorWithSTOPCQ_MSG_TYPE) {
 
 TEST_F(TcrMessageTest, testQueryConstructorWithCLOSECQ_MSG_TYPE) {
   int messageResponseTimeout = 1000;
-  ThinClientBaseDM *connectionDM = NULL;
+  ThinClientBaseDM *connectionDM = nullptr;
 
   TcrMessageCloseCQ message("aRegionName", messageResponseTimeout,
                             connectionDM);
@@ -141,8 +141,8 @@ TEST_F(TcrMessageTest, testQueryConstructorWithCLOSECQ_MSG_TYPE) {
 TEST_F(TcrMessageTest,
        testParameterizedQueryConstructorWithQUERY_WITH_PARAMETERS) {
   int messageResponseTimeout = 1000;
-  ThinClientBaseDM *connectionDM = NULL;
-  const UserDataPtr aCallbackArgument = NULL;
+  ThinClientBaseDM *connectionDM = nullptr;
+  const UserDataPtr aCallbackArgument = nullptr;
   CacheableVectorPtr paramList = CacheableVector::create();
 
   TcrMessageQueryWithParameters message("aRegionName", aCallbackArgument,
@@ -159,12 +159,12 @@ TEST_F(TcrMessageTest,
 
 TEST_F(TcrMessageTest, testConstructorWithCONTAINS_KEY) {
   TcrMessageContainsKey message(
-      static_cast<const Region *>(NULL),
+      static_cast<const Region *>(nullptr),
       CacheableString::create(
           "mykey"),  // static_cast<const CacheableKeyPtr>(nullptr),
       static_cast<const UserDataPtr>(nullptr),
       true,  // isContainsKey
-      static_cast<ThinClientBaseDM *>(NULL));
+      static_cast<ThinClientBaseDM *>(nullptr));
   EXPECT_EQ(TcrMessage::CONTAINS_KEY, message.getMessageType());
 
   EXPECT_MESSAGE_EQ(
@@ -174,7 +174,7 @@ TEST_F(TcrMessageTest, testConstructorWithCONTAINS_KEY) {
 }
 
 TEST_F(TcrMessageTest, testConstructorWithGETDURABLECQS_MSG_TYPE) {
-  TcrMessageGetDurableCqs message(static_cast<ThinClientBaseDM *>(NULL));
+  TcrMessageGetDurableCqs message(static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::GETDURABLECQS_MSG_TYPE, message.getMessageType());
 
@@ -183,11 +183,11 @@ TEST_F(TcrMessageTest, testConstructorWithGETDURABLECQS_MSG_TYPE) {
 
 TEST_F(TcrMessageTest, testConstructor2WithREQUEST) {
   TcrMessageRequest message(
-      static_cast<const Region *>(NULL),
+      static_cast<const Region *>(nullptr),
       CacheableString::create(
           "mykey"),  // static_cast<const CacheableKeyPtr>(nullptr),
       static_cast<const UserDataPtr>(nullptr),
-      static_cast<ThinClientBaseDM *>(NULL));
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::REQUEST, message.getMessageType());
 
@@ -198,11 +198,11 @@ TEST_F(TcrMessageTest, testConstructor2WithREQUEST) {
 }
 
 TEST_F(TcrMessageTest, testConstructor2WithDESTROY) {
-  TcrMessageDestroy message(static_cast<const Region *>(NULL),
+  TcrMessageDestroy message(static_cast<const Region *>(nullptr),
                             CacheableString::create("mykey"),
                             static_cast<const CacheableKeyPtr>(nullptr),
                             static_cast<const UserDataPtr>(nullptr),
-                            static_cast<ThinClientBaseDM *>(NULL));
+                            static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::DESTROY, message.getMessageType());
 
@@ -215,11 +215,11 @@ TEST_F(TcrMessageTest, testConstructor2WithDESTROY) {
 
 TEST_F(TcrMessageTest, testConstructor2WithINVALIDATE) {
   TcrMessageInvalidate message(
-      static_cast<const Region *>(NULL),
+      static_cast<const Region *>(nullptr),
       CacheableString::create(
           "mykey"),  // static_cast<const CacheableKeyPtr>(nullptr),
       static_cast<const UserDataPtr>(nullptr),
-      static_cast<ThinClientBaseDM *>(NULL));
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::INVALIDATE, message.getMessageType());
 
@@ -231,12 +231,12 @@ TEST_F(TcrMessageTest, testConstructor2WithINVALIDATE) {
 }
 
 TEST_F(TcrMessageTest, testConstructor3WithPUT) {
-  TcrMessagePut message(static_cast<const Region *>(NULL),
+  TcrMessagePut message(static_cast<const Region *>(nullptr),
                         CacheableString::create("mykey"),
                         CacheableString::create("myvalue"),
                         static_cast<const UserDataPtr>(nullptr),
                         false,  // isDelta
-                        static_cast<ThinClientBaseDM *>(NULL),
+                        static_cast<ThinClientBaseDM *>(nullptr),
                         false,  // isMetaRegion
                         false,  // fullValueAfterDeltaFail
                         "myRegionName");
@@ -253,7 +253,7 @@ TEST_F(TcrMessageTest, testConstructor3WithPUT) {
 
 TEST_F(TcrMessageTest, testConstructor4) {
   TcrMessageReply message(false,  // decodeAll
-                          static_cast<ThinClientBaseDM *>(NULL));
+                          static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::INVALID, message.getMessageType());
 }
@@ -262,11 +262,11 @@ TEST_F(TcrMessageTest, testConstructor5WithREGISTER_INTERST_LIST) {
   VectorOfCacheableKey keys;
   keys.push_back(CacheableString::create("mykey"));
   TcrMessageRegisterInterestList message(
-      static_cast<const Region *>(NULL), keys,
+      static_cast<const Region *>(nullptr), keys,
       false,  // isDurable
       false,  // isCacheingEnabled
       false,  // receiveValues
-      InterestResultPolicy::NONE, static_cast<ThinClientBaseDM *>(NULL));
+      InterestResultPolicy::NONE, static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::REGISTER_INTEREST_LIST, message.getMessageType());
 
@@ -281,11 +281,11 @@ TEST_F(TcrMessageTest, testConstructor5WithUNREGISTER_INTERST_LIST)
{
   VectorOfCacheableKey keys;
   keys.push_back(CacheableString::create("mykey"));
   TcrMessageUnregisterInterestList message(
-      static_cast<const Region *>(NULL), keys,
+      static_cast<const Region *>(nullptr), keys,
       false,  // isDurable
       false,  // isCacheingEnabled
       false,  // receiveValues
-      InterestResultPolicy::NONE, static_cast<ThinClientBaseDM *>(NULL));
+      InterestResultPolicy::NONE, static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::UNREGISTER_INTEREST_LIST, message.getMessageType());
 
@@ -298,7 +298,7 @@ TEST_F(TcrMessageTest, testConstructor5WithUNREGISTER_INTERST_LIST) {
 
 TEST_F(TcrMessageTest, testConstructorGET_FUNCTION_ATTRIBUTES) {
   TcrMessageGetFunctionAttributes message(
-      std::string("myFunction"), static_cast<ThinClientBaseDM *>(NULL));
+      std::string("myFunction"), static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::GET_FUNCTION_ATTRIBUTES, message.getMessageType());
 
@@ -309,7 +309,7 @@ TEST_F(TcrMessageTest, testConstructorGET_FUNCTION_ATTRIBUTES) {
 
 TEST_F(TcrMessageTest, testConstructorKEY_SET) {
   TcrMessageKeySet message(std::string("myFunctionKeySet"),
-                           static_cast<ThinClientBaseDM *>(NULL));
+                           static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::KEY_SET, message.getMessageType());
 
@@ -326,7 +326,7 @@ TEST_F(TcrMessageTest, testConstructor6WithCREATE_REGION) {
                                  false,  // isDurable
                                  false,  // isCacheingEnabled
                                  false,  // receiveValues
-                                 static_cast<ThinClientBaseDM *>(NULL));
+                                 static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::CREATE_REGION, message.getMessageType());
 
@@ -343,7 +343,7 @@ TEST_F(TcrMessageTest, testConstructor6WithREGISTER_INTEREST) {
       false,  // isDurable
       false,  // isCacheingEnabled
       false,  // receiveValues
-      static_cast<ThinClientBaseDM *>(NULL));
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::REGISTER_INTEREST, message.getMessageType());
 
@@ -361,7 +361,7 @@ TEST_F(TcrMessageTest, testConstructor6WithUNREGISTER_INTEREST) {
       false,  // isDurable
       false,  // isCacheingEnabled
       false,  // receiveValues
-      static_cast<ThinClientBaseDM *>(NULL));
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::UNREGISTER_INTEREST, message.getMessageType());
 
@@ -372,7 +372,8 @@ TEST_F(TcrMessageTest, testConstructor6WithUNREGISTER_INTEREST) {
 }
 
 TEST_F(TcrMessageTest, testConstructorGET_PDX_TYPE_BY_ID) {
-  TcrMessageGetPdxTypeById message(42, static_cast<ThinClientBaseDM *>(NULL));
+  TcrMessageGetPdxTypeById message(42,
+                                   static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::GET_PDX_TYPE_BY_ID, message.getMessageType());
 
@@ -381,7 +382,8 @@ TEST_F(TcrMessageTest, testConstructorGET_PDX_TYPE_BY_ID) {
 }
 
 TEST_F(TcrMessageTest, testConstructorGET_PDX_ENUM_BY_ID) {
-  TcrMessageGetPdxEnumById message(42, static_cast<ThinClientBaseDM *>(NULL));
+  TcrMessageGetPdxEnumById message(42,
+                                   static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::GET_PDX_ENUM_BY_ID, message.getMessageType());
 
@@ -391,8 +393,8 @@ TEST_F(TcrMessageTest, testConstructorGET_PDX_ENUM_BY_ID) {
 
 TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_TYPE) {
   CacheablePtr myPtr(CacheableString::createDeserializable());
-  TcrMessageGetPdxIdForType message(myPtr,
-                                    static_cast<ThinClientBaseDM *>(NULL), 42);
+  TcrMessageGetPdxIdForType message(
+      myPtr, static_cast<ThinClientBaseDM *>(nullptr), 42);
 
   EXPECT_EQ(TcrMessage::GET_PDX_ID_FOR_TYPE, message.getMessageType());
 
@@ -402,7 +404,7 @@ TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_TYPE) {
 
 TEST_F(TcrMessageTest, testConstructorADD_PDX_TYPE) {
   CacheablePtr myPtr(CacheableString::createDeserializable());
-  TcrMessageAddPdxType message(myPtr, static_cast<ThinClientBaseDM *>(NULL),
+  TcrMessageAddPdxType message(myPtr, static_cast<ThinClientBaseDM *>(nullptr),
                                42);
 
   EXPECT_EQ(TcrMessage::ADD_PDX_TYPE, message.getMessageType());
@@ -414,7 +416,8 @@ TEST_F(TcrMessageTest, testConstructorADD_PDX_TYPE) {
 
 TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_ENUM) {
   TcrMessageGetPdxIdForEnum message(static_cast<CacheablePtr>(nullptr),
-                                    static_cast<ThinClientBaseDM *>(NULL), 42);
+                                    static_cast<ThinClientBaseDM *>(nullptr),
+                                    42);
 
   EXPECT_EQ(TcrMessage::GET_PDX_ID_FOR_ENUM, message.getMessageType());
 
@@ -424,7 +427,7 @@ TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_ENUM) {
 TEST_F(TcrMessageTest, testConstructorADD_PDX_ENUM) {
   CacheablePtr myPtr(CacheableString::createDeserializable());
   TcrMessageAddPdxEnum message(static_cast<CacheablePtr>(nullptr),
-                               static_cast<ThinClientBaseDM *>(NULL), 42);
+                               static_cast<ThinClientBaseDM *>(nullptr), 42);
 
   EXPECT_EQ(TcrMessage::ADD_PDX_ENUM, message.getMessageType());
 
@@ -442,14 +445,15 @@ TEST_F(TcrMessageTest, testConstructorEventId) {
 }
 
 TEST_F(TcrMessageTest, testConstructorREMOVE_USER_AUTH) {
-  TcrMessageRemoveUserAuth message(true, static_cast<ThinClientBaseDM *>(NULL));
+  TcrMessageRemoveUserAuth message(true,
+                                   static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::REMOVE_USER_AUTH, message.getMessageType());
 
   EXPECT_MESSAGE_EQ("0000004E0000000600000001FFFFFFFF00000000010001", message);
 
   TcrMessageRemoveUserAuth message2(false,
-                                    static_cast<ThinClientBaseDM *>(NULL));
+                                    static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::REMOVE_USER_AUTH, message2.getMessageType());
 
@@ -458,7 +462,7 @@ TEST_F(TcrMessageTest, testConstructorREMOVE_USER_AUTH) {
 
 TEST_F(TcrMessageTest, testConstructorUSER_CREDENTIAL_MESSAGE) {
   TcrMessageUserCredential message(static_cast<PropertiesPtr>(nullptr),
-                                   static_cast<ThinClientBaseDM *>(NULL));
+                                   static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::USER_CREDENTIAL_MESSAGE, message.getMessageType());
   // this message is currently blank so this should change it if the impl
@@ -500,7 +504,7 @@ TEST_F(TcrMessageTest, testConstructorSIZE) {
 }
 
 TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION_SINGLE_HOP) {
-  const Region *region = NULL;
+  const Region *region = nullptr;
 
   CacheableHashSetPtr myHashCachePtr = CacheableHashSet::create();
 
@@ -508,7 +512,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION_SINGLE_HOP)
{
   TcrMessageExecuteRegionFunctionSingleHop message(
       "myFuncName", region, myPtr, myHashCachePtr, 2, myHashCachePtr,
       false,  // allBuckets
-      1, static_cast<ThinClientBaseDM *>(NULL));
+      1, static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP,
             message.getMessageType());
@@ -524,7 +528,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION_SINGLE_HOP)
{
 }
 
 TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION) {
-  const Region *region = NULL;
+  const Region *region = nullptr;
 
   CacheableHashSetPtr myHashCachePtr = CacheableHashSet::create();
   CacheablePtr myCacheablePtr(CacheableString::createDeserializable());
@@ -532,7 +536,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION) {
 
   TcrMessageExecuteRegionFunction testMessage(
       "ExecuteRegion", region, myCacheablePtr, myVectPtr, 2, myHashCachePtr, 10,
-      static_cast<ThinClientBaseDM *>(NULL), 10);
+      static_cast<ThinClientBaseDM *>(nullptr), 10);
 
   EXPECT_EQ(TcrMessage::EXECUTE_REGION_FUNCTION, testMessage.getMessageType());
   // this message is currently blank so this should change it if the impl
@@ -551,9 +555,9 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION) {
 TEST_F(TcrMessageTest, testConstructorEXECUTE_FUNCTION) {
   CacheablePtr myCacheablePtr(CacheableString::createDeserializable());
 
-  TcrMessageExecuteFunction testMessage("ExecuteFunction", myCacheablePtr, 1,
-                                        static_cast<ThinClientBaseDM *>(NULL),
-                                        10);
+  TcrMessageExecuteFunction testMessage(
+      "ExecuteFunction", myCacheablePtr, 1,
+      static_cast<ThinClientBaseDM *>(nullptr), 10);
 
   EXPECT_EQ(TcrMessage::EXECUTE_FUNCTION, testMessage.getMessageType());
 
@@ -570,7 +574,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTECQ_MSG_TYPE) {
 
   TcrMessageExecuteCq testMessage("ExecuteCQ", "select * from /somewhere",
                                   CqState::RUNNING, false,
-                                  static_cast<ThinClientBaseDM *>(NULL));
+                                  static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::EXECUTECQ_MSG_TYPE, testMessage.getMessageType());
 
@@ -600,7 +604,8 @@ TEST_F(TcrMessageTest, testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE)
{
   }
   oss << ") and s.type in SET('AAA','BBB','CCC','DDD') limit 60000";
   TcrMessageExecuteCq testMessage("ExecuteCQ", oss.str(), CqState::RUNNING,
-                                  false, static_cast<ThinClientBaseDM *>(NULL));
+                                  false,
+                                  static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::EXECUTECQ_MSG_TYPE, testMessage.getMessageType());
 
@@ -615,7 +620,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTECQ_WITH_IR_MSG_TYPE) {
 
   TcrMessageExecuteCqWithIr testMessage(
       "ExecuteCQWithIr", "select * from /somewhere", CqState::RUNNING, false,
-      static_cast<ThinClientBaseDM *>(NULL));
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::EXECUTECQ_WITH_IR_MSG_TYPE,
             testMessage.getMessageType());
@@ -626,4 +631,3 @@ TEST_F(TcrMessageTest, testConstructorEXECUTECQ_WITH_IR_MSG_TYPE) {
       "000001000000010000000000010001",
       testMessage);
 }
-

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cli/NewFwkLib/CacheServer.cs
----------------------------------------------------------------------
diff --git a/src/tests/cli/NewFwkLib/CacheServer.cs b/src/tests/cli/NewFwkLib/CacheServer.cs
index 8ddff64..6f9b138 100644
--- a/src/tests/cli/NewFwkLib/CacheServer.cs
+++ b/src/tests/cli/NewFwkLib/CacheServer.cs
@@ -4713,7 +4713,6 @@ private void checkUpdatedValue(TKey key, TVal value)
             }
             else if (opCode == "executefunction")
             {
-              bool getResult = true;
               string funcName = null;
               Random rdn = new Random();
               int num = rdn.Next(3);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/fwklib/FrameworkTest.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/fwklib/FrameworkTest.cpp b/src/tests/cpp/fwklib/FrameworkTest.cpp
index 75df49a..1bb3b4e 100644
--- a/src/tests/cpp/fwklib/FrameworkTest.cpp
+++ b/src/tests/cpp/fwklib/FrameworkTest.cpp
@@ -317,9 +317,7 @@ void FrameworkTest::destroyAllRegions() {
   // destroy all root regions
   VectorOfRegion vec;
   m_cache->rootRegions(vec);
-  int32_t size = vec.size();
-  for (int32_t idx = 0; idx < size; idx++) {
-    RegionPtr region = vec.at(idx);
+  for (auto& region : vec) {
     localDestroyRegion(region);
   }
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/DeltaFastAssetAccount.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/DeltaFastAssetAccount.cpp b/src/tests/cpp/testobject/DeltaFastAssetAccount.cpp
index 0401537..3094b2d 100644
--- a/src/tests/cpp/testobject/DeltaFastAssetAccount.cpp
+++ b/src/tests/cpp/testobject/DeltaFastAssetAccount.cpp
@@ -29,7 +29,7 @@ DeltaFastAssetAccount::DeltaFastAssetAccount(int index, bool encodeTimestp,
   assets = CacheableHashMap::create();
   for (int i = 0; i < asstSize; i++) {
     auto asset = std::make_shared<FastAsset>(i, maxVal);
-    assets->insert(CacheableInt32::create(i), asset);
+    assets->emplace(CacheableInt32::create(i), asset);
     netWorth += asset->getValue();
   }
   if (encodeTimestamp) {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/DeltaFastAssetAccount.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/DeltaFastAssetAccount.hpp b/src/tests/cpp/testobject/DeltaFastAssetAccount.hpp
index 2037530..e5979d2 100644
--- a/src/tests/cpp/testobject/DeltaFastAssetAccount.hpp
+++ b/src/tests/cpp/testobject/DeltaFastAssetAccount.hpp
@@ -136,11 +136,10 @@ class TESTOBJECT_EXPORT DeltaFastAssetAccount : public Cacheable, public
Delta {
   virtual DeltaPtr clone() {
     auto clonePtr = std::make_shared<DeltaFastAssetAccount>();
     clonePtr->assets = CacheableHashMap::create();
-    for (HashMapOfCacheable::Iterator item = this->assets->begin();
-         item != this->assets->end(); item++) {
-      auto key = std::dynamic_pointer_cast<CacheableInt32>(item.first());
-      auto asset = std::dynamic_pointer_cast<FastAsset>(item.second());
-      clonePtr->assets->insert(key, asset->copy());
+    for (const auto& item : *(this->assets)) {
+      auto key = std::dynamic_pointer_cast<CacheableInt32>(item.first);
+      auto asset = std::dynamic_pointer_cast<FastAsset>(item.second);
+      clonePtr->assets->emplace(key, asset->copy());
     }
     return clonePtr;
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/FastAssetAccount.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/FastAssetAccount.cpp b/src/tests/cpp/testobject/FastAssetAccount.cpp
index 58b7d40..8ef234d 100644
--- a/src/tests/cpp/testobject/FastAssetAccount.cpp
+++ b/src/tests/cpp/testobject/FastAssetAccount.cpp
@@ -31,7 +31,7 @@ FastAssetAccount::FastAssetAccount(int idx, bool encodeTimestp, int maxVal,
   assets = CacheableHashMap::create();
   for (int i = 0; i < asstSize; i++) {
     auto asset = std::make_shared<FastAsset>(i, maxVal);
-    assets->insert(CacheableInt32::create(i), asset);
+    assets->emplace(CacheableInt32::create(i), asset);
     netWorth += asset->getValue();
   }
   if (encodeTimestamp) {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/InvalidPdxUsage.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/InvalidPdxUsage.hpp b/src/tests/cpp/testobject/InvalidPdxUsage.hpp
index f4301a6..e2b9c48 100644
--- a/src/tests/cpp/testobject/InvalidPdxUsage.hpp
+++ b/src/tests/cpp/testobject/InvalidPdxUsage.hpp
@@ -404,13 +404,13 @@ class TESTOBJECT_EXPORT InvalidPdxUsage : public PdxSerializable {
     m_arraylist->push_back(CacheableInt32::create(2));
 
     m_map = CacheableHashMap::create();
-    m_map->insert(CacheableInt32::create(1), CacheableInt32::create(1));
-    m_map->insert(CacheableInt32::create(2), CacheableInt32::create(2));
+    m_map->emplace(CacheableInt32::create(1), CacheableInt32::create(1));
+    m_map->emplace(CacheableInt32::create(2), CacheableInt32::create(2));
 
     m_hashtable = CacheableHashTable::create();
-    m_hashtable->insert(CacheableInt32::create(1),
-                        CacheableString::create("1111111111111111"));
-    m_hashtable->insert(
+    m_hashtable->emplace(CacheableInt32::create(1),
+                         CacheableString::create("1111111111111111"));
+    m_hashtable->emplace(
         CacheableInt32::create(2),
         CacheableString::create("2222222222221111111111111111"));
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/NonPdxType.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/NonPdxType.hpp b/src/tests/cpp/testobject/NonPdxType.hpp
index 7b43ea5..b7f5989 100644
--- a/src/tests/cpp/testobject/NonPdxType.hpp
+++ b/src/tests/cpp/testobject/NonPdxType.hpp
@@ -264,13 +264,13 @@ class TESTOBJECT_EXPORT NonPdxType {
     m_arraylist->push_back(CacheableInt32::create(2));
 
     m_map = CacheableHashMap::create();
-    m_map->insert(CacheableInt32::create(1), CacheableInt32::create(1));
-    m_map->insert(CacheableInt32::create(2), CacheableInt32::create(2));
+    m_map->emplace(CacheableInt32::create(1), CacheableInt32::create(1));
+    m_map->emplace(CacheableInt32::create(2), CacheableInt32::create(2));
 
     m_hashtable = CacheableHashTable::create();
-    m_hashtable->insert(CacheableInt32::create(1),
-                        CacheableString::create("1111111111111111"));
-    m_hashtable->insert(
+    m_hashtable->emplace(CacheableInt32::create(1),
+                         CacheableString::create("1111111111111111"));
+    m_hashtable->emplace(
         CacheableInt32::create(2),
         CacheableString::create("2222222222221111111111111111"));
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/PdxType.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/PdxType.hpp b/src/tests/cpp/testobject/PdxType.hpp
index 3a3ab61..ae24060 100644
--- a/src/tests/cpp/testobject/PdxType.hpp
+++ b/src/tests/cpp/testobject/PdxType.hpp
@@ -507,13 +507,13 @@ class TESTOBJECT_EXPORT PdxType : public PdxSerializable {
     m_linkedlist->push_back(CacheableInt32::create(2));
 
     m_map = CacheableHashMap::create();
-    m_map->insert(CacheableInt32::create(1), CacheableInt32::create(1));
-    m_map->insert(CacheableInt32::create(2), CacheableInt32::create(2));
+    m_map->emplace(CacheableInt32::create(1), CacheableInt32::create(1));
+    m_map->emplace(CacheableInt32::create(2), CacheableInt32::create(2));
 
     m_hashtable = CacheableHashTable::create();
-    m_hashtable->insert(CacheableInt32::create(1),
-                        CacheableString::create("1111111111111111"));
-    m_hashtable->insert(
+    m_hashtable->emplace(CacheableInt32::create(1),
+                         CacheableString::create("1111111111111111"));
+    m_hashtable->emplace(
         CacheableInt32::create(2),
         CacheableString::create("2222222222221111111111111111"));
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/PdxVersioned1.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/PdxVersioned1.cpp b/src/tests/cpp/testobject/PdxVersioned1.cpp
index 02a0317..c36d543 100644
--- a/src/tests/cpp/testobject/PdxVersioned1.cpp
+++ b/src/tests/cpp/testobject/PdxVersioned1.cpp
@@ -15,11 +15,11 @@
  * limitations under the License.
  */
 /*
-* PdxObject.cpp
-*
-*  Created on: Sep 29, 2011
-*      Author: npatel
-*/
+ * PdxObject.cpp
+ *
+ *  Created on: Sep 29, 2011
+ *      Author: npatel
+ */
 
 #include "PdxVersioned1.hpp"
 
@@ -218,8 +218,8 @@ void PdxVersioned1::init(const char* key) {
   m_arraylist->push_back(CacheableInt32::create(2));
 
   m_map = CacheableHashMap::create();
-  m_map->insert(CacheableInt32::create(1), CacheableInt32::create(1));
-  m_map->insert(CacheableInt32::create(2), CacheableInt32::create(2));
+  m_map->emplace(CacheableInt32::create(1), CacheableInt32::create(1));
+  m_map->emplace(CacheableInt32::create(2), CacheableInt32::create(2));
   m_pdxEnum = CacheableEnum::create("pdxEnumTest", "pdx2", pdx2);
   m_byte252 = new int8_t[252];
   for (int i = 0; i < 252; i++) {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/PdxVersioned2.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/PdxVersioned2.cpp b/src/tests/cpp/testobject/PdxVersioned2.cpp
index ffe4d7d..4813a62 100644
--- a/src/tests/cpp/testobject/PdxVersioned2.cpp
+++ b/src/tests/cpp/testobject/PdxVersioned2.cpp
@@ -15,11 +15,11 @@
  * limitations under the License.
  */
 /*
-* PdxObject.cpp
-*
-*  Created on: Sep 29, 2011
-*      Author: npatel
-*/
+ * PdxObject.cpp
+ *
+ *  Created on: Sep 29, 2011
+ *      Author: npatel
+ */
 
 #include "PdxVersioned2.hpp"
 
@@ -222,8 +222,8 @@ void PdxVersioned2::init(const char* key) {
   m_arraylist->push_back(CacheableInt32::create(2));
 
   m_map = CacheableHashMap::create();
-  m_map->insert(CacheableInt32::create(1), CacheableInt32::create(1));
-  m_map->insert(CacheableInt32::create(2), CacheableInt32::create(2));
+  m_map->emplace(CacheableInt32::create(1), CacheableInt32::create(1));
+  m_map->emplace(CacheableInt32::create(2), CacheableInt32::create(2));
   m_pdxEnum = CacheableEnum::create("pdxEnumTest1", "pdx2", pdx2);
   m_byte252 = new int8_t[252];
   for (int i = 0; i < 252; i++) {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/Portfolio.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/Portfolio.cpp b/src/tests/cpp/testobject/Portfolio.cpp
index 50773a8..4277d64 100644
--- a/src/tests/cpp/testobject/Portfolio.cpp
+++ b/src/tests/cpp/testobject/Portfolio.cpp
@@ -45,8 +45,8 @@ Portfolio::Portfolio(int32_t i, uint32_t size, CacheableStringArrayPtr nm)
     position2 = nullptr;
   }
   positions = CacheableHashMap::create();
-  positions->insert(CacheableString::create(secIds[Position::cnt % numSecIds]),
-                    position1);
+  positions->emplace(CacheableString::create(secIds[Position::cnt % numSecIds]),
+                     position1);
   newVal = new uint8_t[size + 1];
   memset(newVal, 'B', size);
   newVal[size] = '\0';

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/tests/cpp/testobject/PortfolioPdx.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cpp/testobject/PortfolioPdx.cpp b/src/tests/cpp/testobject/PortfolioPdx.cpp
index 1328f82..8941b4b 100644
--- a/src/tests/cpp/testobject/PortfolioPdx.cpp
+++ b/src/tests/cpp/testobject/PortfolioPdx.cpp
@@ -52,7 +52,7 @@ PortfolioPdx::PortfolioPdx(int32_t i, int32_t size, char** nm) : names(nm)
{
     position2 = nullptr;
   }
   positions = CacheableHashMap::create();
-  positions->insert(
+  positions->emplace(
       CacheableString::create(secIds[PositionPdx::cnt % numSecIds]), position1);
 
   if (size > 0) {


Mime
View raw message