调整压力测试
This commit is contained in:
parent
2b5be77410
commit
ae04876dc7
|
@ -300,19 +300,24 @@ public:
|
|||
size_t l = 0;
|
||||
bool type = true;
|
||||
wchar_t buf[128] =L"";
|
||||
int ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
|
||||
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
||||
{
|
||||
wstr.resize(l);
|
||||
ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
|
||||
}
|
||||
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
||||
int ret = SCANNER_ERR_OK;
|
||||
if (code != SANE_EVENT_IMAGE_OK)
|
||||
{
|
||||
type = false;
|
||||
|
||||
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)wstr.c_str(), type);
|
||||
return -1;
|
||||
ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
|
||||
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
||||
{
|
||||
wstr.resize(l);
|
||||
ret = str_to_wchar((char*)data, (wchar_t*)wstr.c_str(), &l);
|
||||
}
|
||||
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
||||
{
|
||||
type = false;
|
||||
|
||||
h->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)wstr.c_str(), type);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
//std::string str = StringToUtf((char*)data);
|
||||
switch (code)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue