diff options
Diffstat (limited to 'proto_test')
-rw-r--r-- | proto_test/main.cpp | 23 | ||||
-rw-r--r-- | proto_test/proto_test.project | 3 |
2 files changed, 20 insertions, 6 deletions
diff --git a/proto_test/main.cpp b/proto_test/main.cpp index 28d04e9..ba0b8e8 100644 --- a/proto_test/main.cpp +++ b/proto_test/main.cpp @@ -76,6 +76,7 @@ bool test_services_extraction() c.description = "command 3 desc"; s1.cmds.push_back(c); list1.push_back(s1); + s1.cmds.clear(); s1.service = "sd,fhjsiufhifhirhwiefbbbbvwyefgweyfuyvbwf service 2 aaaaaaaaaaaaaaaaaa111111111111111111111111asdasdasd"; c.command = "2command 1"; c.description = "2some desc"; @@ -87,6 +88,7 @@ bool test_services_extraction() c.description = "2command 3 desc"; s1.cmds.push_back(c); list1.push_back(s1); + s1.cmds.clear(); s1.service = "sd,fhjsiufhiadadsdfgdffghghjbnfdghdgffhirhwiefbbbbvwyefgweyfuyvbwf service 2 aaaaaaaaaaaaaaaaaa111111111111111111111111asdasdasd"; c.command = "32commanasdasdd 1"; c.description = "32some desc"; @@ -101,13 +103,24 @@ bool test_services_extraction() delete p; p = packet::serv_make_services_packet(list1); std::list<service_s> *list2 = packet::cli_extract_services(*p); - for(std::list<service_s>::iterator i = list2->begin(), end = list2->end(); i != end; ++i) +/* std::cout<<"\n\nlist1 content\n\n\n"; + for(std::list<service_s>::iterator i = list1.begin(), end = list1.end(); i != end; ++i) { - //if(std::find(list1.begin(), list1.end(), *i) == list1.end()) //fuck - for(std::list<service_s>::iterator ii = list1.begin(), end = list1.end(); ii != end; ++ii) - if(*ii != *i) - return false; + std::cout<<"service name: "<<i->service<<"\n\t"; + for(std::list<service_s::cmd>::iterator ii = i->cmds.begin(), eend = i->cmds.end(); ii != eend; ++ii) + std::cout<<ii->command<<"|"<<ii->description<<"; "; + std::cout<<"\n\n"; } + std::cout<<"\n\nlist2 content\n\n\n"; + for(std::list<service_s>::iterator i = list2->begin(), end = list2->end(); i != end; ++i) + { + std::cout<<"service name: "<<i->service<<"\n\t"; + for(std::list<service_s::cmd>::iterator ii = i->cmds.begin(), eend = i->cmds.end(); ii != eend; ++ii) + std::cout<<ii->command<<"|"<<ii->description<<"; "; + std::cout<<"\n\n"; + } */ + if(list1 != *list2) + return false; return true; } diff --git a/proto_test/proto_test.project b/proto_test/proto_test.project index ffb4e33..63124f1 100644 --- a/proto_test/proto_test.project +++ b/proto_test/proto_test.project @@ -70,7 +70,8 @@ <ResourceCompiler Options="" Required="no"/> <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/> <Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>"> - <![CDATA[]]> + <![CDATA[ + ]]> </Environment> <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath=""> <PostConnectCommands/> |