Ejemplo n.º 1
0
int __cdecl main(void) {
  test_parse_port_string();
  test_mg_strcasestr();
  test_alloc_vprintf();
  test_base64_encode();
  test_match_prefix();
  test_remove_double_dots();
  test_should_keep_alive();
  test_parse_http_message();
  test_mg_download();
  test_mg_get_var();
  test_set_throttle();
  test_next_option();
  test_mg_stat();
  test_skip_quoted();
  test_mg_upload();
  test_request_replies();
  test_api_calls();
  test_url_decode();
  test_mg_get_cookie();
  test_strtoll();
#ifdef USE_LUA
  test_lua();
#endif

  printf("TOTAL TESTS: %d, FAILED: %d\n", s_total_tests, s_failed_tests);

  return s_failed_tests == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
Ejemplo n.º 2
0
int __cdecl main(void) {
  test_mg_strcasestr();
  test_alloc_vprintf();
  test_base64_encode();
  test_match_prefix();
  test_remove_double_dots();
  test_should_keep_alive();
  test_parse_http_message();
  test_mg_download();
  test_mg_get_var();
  test_set_throttle();
  test_next_option();
  test_mg_stat();
  test_skip_quoted();
  test_mg_upload();
  test_request_replies();
  test_api_calls();
  test_url_decode();
  test_mg_get_cookie();
#ifdef USE_LUA
  test_lua();
#endif

  printf("%s\n", "PASSED");
  return 0;
}
Ejemplo n.º 3
0
int main()
{
	std::cout<<"sizeof(void*) is:"<<(int)sizeof(intptr_t)<<std::endl;
	std::cout<<"sizeof(void*) is:"<<(int)sizeof(void*)<<std::endl;
	std::cout << "sizeof(xe_uint32) is:" << sizeof(ds_uint32) << std::endl;
	std::cout << "sizeof(xe_uint64) is:" << sizeof(ds_uint64) << std::endl;
	printf("hello world %s\n", dios::util::CCrypto::Md5("hello world").c_str());

	test_lua();
}
Ejemplo n.º 4
0
int main(void) {
  test_base64_encode();
  test_match_prefix();
  test_remove_double_dots();
  test_should_keep_alive();
  test_parse_http_request();
  test_mg_fetch();
  test_mg_get_var();
  test_set_throttle();
  test_next_option();
#ifdef USE_LUA
  test_lua();
#endif
  return 0;
}
Ejemplo n.º 5
0
int __cdecl main(void) {
  test_base64_encode();
  test_match_prefix();
  test_remove_double_dots();
  test_should_keep_alive();
  test_parse_http_message();
  test_mg_download();
  test_mg_get_var();
  test_set_throttle();
  test_next_option();
  test_user_data();
  test_mg_stat();
  test_mg_upload();
#ifdef USE_LUA
  test_lua();
#endif
  test_skip_quoted();
  printf("%s\n", "PASSED");
  return 0;
}
Ejemplo n.º 6
0
int _tmain(int argc, _TCHAR* argv[])
{
	LOG_F("xTest main(), 测试 \n");


	int arg = 1018;
	switch(arg)
	{
	case 1000:
		{
			test_util_ex();
		}break;	
	case 1:
		{
			test_util();
		}break;
	case 2:
		{
			test_container();
		}break;
	case 3:
		{
			test_thread();
		}break;
	case 4:
		{
			test_net(true);
		}break;		
	case 5:
		{
			test_boost();
		}break;	
	case 6:
		{
			test_kbe();
		}break;	
	case 1001:
		{
			test_db();
		}break;	
	case 1002:
		{
			test_math();
		}break;	
	case 1003:
		{
			test_design();
		}break;	
	case 1005:
		{
			//test_net(false);
			test_async(true); 
		}break;	
	case 1006:
		{
			test_lua(); 
		}break;	
	case 1007:
		{
			test_js(); 
		}break;	
	case 1008:
		{
			test_proto(); 
		}break;	
	case 1010:
		{
			test_graph();
		}break;
	case 1011:
		{
			test_graph_d3d();
		}break;
	case 1013:
		{
			test_cv();
		}break;
	case 1015:
		{
			test_battle();
		}break;
	case 1016:
		{
			test_hacker();
		}break;
	case 1017:
		{
			test_yh();
		}break;
	case 1018:
		{
			test_ai();
		}
	case 1900:
		{
			test_tool();
		}break;
	default:
		{
			MainEx(argc, argv);
		}break;
	}


// 	{
// 		int n = X::Init(NULL);
// 		LOGD_F(" n = %d", n);
// 
// 		X_HSER->Init();
// 		X_HSER->Start();
// 
// 		X_HSER->Stop();
// 		X_HSER->Destroy();
// 	}
	

// 	{
//	//  [4/26/2015 Administrator]
// 		HINSTANCE hnst=LoadLibrary(_T("xService.dll"));
// 		FreeLibrary(hnst);
// 
// 		HINSTANCE hnst2=LoadLibrary(_T("xService.dll"));
// 		FreeLibrary(hnst);
// 
// 	}
	
	LOG_F("xTest main(), end");
	while(true)
	{
		X::Sleep_f(1);
	}
	return 0;
}