void CheckData(RegistrarClient& client) { char* result; result = static_cast<char*>(client.ReadData(kKey1)); assert( ! memcmp(result, kData1.c_str(), kData1.size()) ); free(result); result = static_cast<char*>(client.ReadData(kKey2)); assert( ! memcmp(result, kData2, sizeof(kData2)) ); free(result); }
void CheckData(RegistrarClient& client) { Package result = client.ReadData(kKey1); assert( ! memcmp(result.GetData(), kData1.c_str(), kData1.size()) ); result.FreeData(); result = client.ReadData(kKey2); assert( ! memcmp(result.GetData(), kData2, sizeof(kData2)) ); result.FreeData(); result = client.ReadData(kKey3); assert( result.GetData() == NULL ); }
void CheckData(RegistrarClient& client) { Package result = client.ReadData(kKey); assert( ! memcmp(result.GetData(), kData, sizeof(kData)) ); result.FreeData(); }