예제 #1
0
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);
}
예제 #2
0
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 );
}
예제 #3
0
void InitData(RegistrarClient& client)
{
    client.WriteData(kKey1, Package(kData1.c_str(), kData1.size()));
    client.WriteData(kKey2, Package(&kData2, sizeof(kData2)));
}
예제 #4
0
void CheckData(RegistrarClient& client)
{
    Package result = client.ReadData(kKey);
    assert( ! memcmp(result.GetData(), kData, sizeof(kData)) );
    result.FreeData();
}
예제 #5
0
void InitData(RegistrarClient& client)
{
    client.WriteData(kKey, Package(&kData, sizeof(kData)));
}
예제 #6
0
void InitData(RegistrarClient& client)
{
    client.WriteData(kKey1, const_cast<char*>(kData1.c_str()), kData1.size());
    client.WriteData(kKey2, &kData2, sizeof(kData2));
}