调整压力测试

This commit is contained in:
13038267101 2023-01-06 15:34:35 +08:00
parent 2b5be77410
commit ae04876dc7
1 changed files with 16 additions and 11 deletions

View File

@ -300,7 +300,10 @@ public:
size_t l = 0; size_t l = 0;
bool type = true; bool type = true;
wchar_t buf[128] =L""; wchar_t buf[128] =L"";
int ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l); int ret = SCANNER_ERR_OK;
if (code != SANE_EVENT_IMAGE_OK)
{
ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
if (ret == ERROR_INSUFFICIENT_BUFFER) if (ret == ERROR_INSUFFICIENT_BUFFER)
{ {
wstr.resize(l); wstr.resize(l);
@ -313,6 +316,8 @@ public:
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)wstr.c_str(), type); h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)wstr.c_str(), type);
return -1; return -1;
} }
}
//std::string str = StringToUtf((char*)data); //std::string str = StringToUtf((char*)data);
switch (code) switch (code)
{ {