mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-23 08:08:07 +00:00
In automatic tests, enhanced logs to provide more info for the inconsistent results. Also handled the fact that the txt files used for results matching instead of having \r\n they have \n.
This commit is contained in:
parent
00d0e8d8d0
commit
0c59e57f79
@ -52,11 +52,17 @@ std::shared_ptr<ValidationStats> DecodeValidator::testDecodeWithExpectedOutput(Q
|
||||
decoder.setDecoder(enabledDecoder);
|
||||
|
||||
QString result = decoder.decodeImage(imageToDecode);
|
||||
result.replace("\r\n","\n");
|
||||
|
||||
stats_->setElaspedTime(decoder.getProcessTimeOfLastDecoding());
|
||||
stats_->setOperationSuccess(result != "");
|
||||
stats_->setResultMatch(expectedOutput != "" && result == expectedOutput);
|
||||
|
||||
if(!stats_->getResultMatch() && stats_->getOperationSuccess()) {
|
||||
qDebug() << "Expected: " << expectedOutput;
|
||||
qDebug() << "Decoded: " << result;
|
||||
}
|
||||
|
||||
return stats_;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user