/* * libretroshare/src/serialiser: tlvconfig_test.cc * * RetroShare Serialiser. * * Copyright 2007-2008 by Chris Parker. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License Version 2 as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA. * * Please report all bugs and problems to "retroshare@lunamutt.com". * */ /****************************************************************** * tlvfileitem test. * * */ #include #include #include #include "serialiser/rstlvtypes.h" #include "serialiser/rstlvkvwide.h" #include "serialiser/rstlvutil.h" #include "util/utest.h" INITTEST(); static int testRsTlvPeerIdSet(); static int testRsTlvServiceIdSet(); static int testRsTlvKeyValue(); static int testRsTlvKeyValueSet(); static int testRsTlvWideSet(); int main() { std::cerr << "RsTlvConfig[Item/Data/...] Tests" << std::endl; testRsTlvPeerIdSet(); testRsTlvServiceIdSet();//tbd testRsTlvKeyValue();//tbd testRsTlvKeyValueSet();//tbd testRsTlvWideSet(); 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>HG�!�%$"; randString[4] = "e>