diff --git a/libretroshare/src/serialiser/tlvconfig_test.cc b/libretroshare/src/serialiser/tlvconfig_test.cc new file mode 100755 index 000000000..50c0704b5 --- /dev/null +++ b/libretroshare/src/serialiser/tlvconfig_test.cc @@ -0,0 +1,132 @@ + +/****************************************************************** + * tlvfileitem test. + * + * + */ + +#include +#include +#include "rstlvtypes.h" +#include "rstlvutil.h" +#include "utest.h" + +INITTEST(); + +static int testRsTlvPeerIdSet(); +static int testRsTlvServiceIdSet(); +static int testRsTlvKeyValue(); +static int testRsTlvKeyValueSet(); + + +int main() +{ + std::cerr << "RsTlvConfig[Item/Data/...] Tests" << std::endl; + + testRsTlvPeerIdSet(); + testRsTlvServiceIdSet();//tbd + testRsTlvKeyValue();//tbd + testRsTlvKeyValueSet();//tbd + + + FINALREPORT("RsTlvConfig[Item/Data/...] Tests"); + + return TESTRESULT(); +} + +int testRsTlvPeerIdSet() +{ + + RsTlvPeerIdSet i1, i2; // one to set and other to get + + std::string testString; + + std::string randString[5]; + randString[0] = "e$424!£!£"; + randString[1] = "e~:@L{L{KHKG"; + randString[2] = "e{@O**/*/*"; + randString[3] = "e?<HG£!£%$"; + randString[4] = "e>HG£!£%$"; + randString[4] = "e>