mirror of
https://github.com/openharmony/arkXtest.git
synced 2026-07-19 20:13:43 -04:00
@@ -56,6 +56,7 @@ namespace OHOS::uitest {
|
||||
int g_timeindex = 1000;
|
||||
int g_timeinterval = 5000;
|
||||
int g_maxdistance = 220;
|
||||
int g_length = 20;
|
||||
int g_velocity = 1500;
|
||||
std::ofstream g_outfile;
|
||||
std::string g_operationtype[6] = {"click", "longClick", "doubleClick", "swipe", "drag", "fling"};
|
||||
@@ -108,7 +109,7 @@ namespace OHOS::uitest {
|
||||
outFile << data.x2Posi << ',';
|
||||
outFile << data.y2Posi << ',';
|
||||
outFile << ((data.interval + g_timeindex - 1) / g_timeindex) << ',';
|
||||
outFile << 0 << ',';
|
||||
outFile << g_length << ',';
|
||||
outFile << g_velocity << std::endl;
|
||||
}
|
||||
|
||||
@@ -121,7 +122,7 @@ namespace OHOS::uitest {
|
||||
int x2Posi = -1;
|
||||
int y2Posi = -1;
|
||||
int interval = -1;
|
||||
int distance = -1;
|
||||
int length = -1;
|
||||
int velocity = -1;
|
||||
while (!inFile.eof()) {
|
||||
inFile >> buffer;
|
||||
@@ -133,7 +134,7 @@ namespace OHOS::uitest {
|
||||
x2Posi = std::stoi(caseInfo[THREE]);
|
||||
y2Posi = std::stoi(caseInfo[FOUR]);
|
||||
interval = std::stoi(caseInfo[FIVE]);
|
||||
distance = std::stoi(caseInfo[SIX]);
|
||||
length = std::stoi(caseInfo[SIX]);
|
||||
velocity = std::stoi(caseInfo[SEVEN]);
|
||||
if (inFile.fail()) {
|
||||
break;
|
||||
@@ -144,7 +145,7 @@ namespace OHOS::uitest {
|
||||
<< x2Posi << ";"
|
||||
<< y2Posi << ";"
|
||||
<< interval << ";"
|
||||
<< distance << ";"
|
||||
<< length << ";"
|
||||
<< velocity << ";" << std::endl;
|
||||
}
|
||||
usleep(interval * g_timeindex);
|
||||
|
||||
Reference in New Issue
Block a user