This commit is contained in:
aozhiwei 2019-08-31 13:23:06 +08:00
parent 5af7000b0f
commit f0ee6ebd72

View File

@ -132,8 +132,43 @@ static void HttpTest()
}
}
static void test()
{
{
std::map<std::string, std::string> test_hash;
for (int i = 0; i < 10; ++i) {
test_hash[a8::XValue(i).GetString()] = a8::XValue(i).GetString();
}
std::map<std::string, std::string> test_hash_copy;
bool combin_ok = false;
do {
combin_ok = false;
int i = 0;
for (auto& pair1 : test_hash) {
for (auto& pair2 : test_hash_copy) {
++i;
if (i > 3) {
std::string t1 = pair1.first;
std::string t2 = pair2.first;
test_hash.erase(t1);
test_hash.erase(t2);
test_hash_copy.erase(t1);
test_hash_copy.erase(t2);
combin_ok = true;
break;
}
}
}
} while(combin_ok);
}
}
bool App::Init(int argc, char* argv[])
{
#if 0
test();
#endif
signal(SIGPIPE, SIG_IGN);
this->argc = argc;
this->argv = argv;