mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Convert qDebug() to report_info() in testing code
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4de109bbf1
commit
6dd5ec296d
3 changed files with 14 additions and 14 deletions
|
|
@ -3,11 +3,11 @@
|
|||
#include "core/deco.h"
|
||||
#include "core/dive.h"
|
||||
#include "core/event.h"
|
||||
#include "core/errorhelper.h"
|
||||
#include "core/planner.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/subsurfacestartup.h"
|
||||
#include "core/units.h"
|
||||
#include <QDebug>
|
||||
|
||||
#define DEBUG 1
|
||||
|
||||
|
|
@ -425,18 +425,18 @@ bool compareDecoTime(int actualRunTimeSeconds, int benchmarkRunTimeSeconds, int
|
|||
int totalDifferenceAllowed = lrint(0.001 * permilDifferenceAllowed * benchmarkRunTimeSeconds + absoluteDifferenceAllowedSeconds);
|
||||
int totalDifference = abs(actualRunTimeSeconds - benchmarkRunTimeSeconds);
|
||||
|
||||
qDebug("Calculated run time = %d seconds", actualRunTimeSeconds);
|
||||
qDebug("Expected run time = %d seconds", benchmarkRunTimeSeconds);
|
||||
qDebug("Allowed time difference is %g percent plus %d seconds = %d seconds",
|
||||
report_info("Calculated run time = %d seconds", actualRunTimeSeconds);
|
||||
report_info("Expected run time = %d seconds", benchmarkRunTimeSeconds);
|
||||
report_info("Allowed time difference is %g percent plus %d seconds = %d seconds",
|
||||
permilDifferenceAllowed * 0.1, absoluteDifferenceAllowedSeconds, totalDifferenceAllowed);
|
||||
qDebug("total difference = %d seconds", totalDifference);
|
||||
report_info("total difference = %d seconds", totalDifference);
|
||||
|
||||
result = (totalDifference <= totalDifferenceAllowed);
|
||||
}
|
||||
if ((knownSsrfRunTimeSeconds > 0) && (actualRunTimeSeconds != knownSsrfRunTimeSeconds)) {
|
||||
QWARN("Calculated run time does not match known Subsurface runtime");
|
||||
qWarning("Calculated runtime: %d", actualRunTimeSeconds);
|
||||
qWarning("Known Subsurface runtime: %d", knownSsrfRunTimeSeconds);
|
||||
report_error("Calculated run time does not match known Subsurface runtime");
|
||||
report_error("Calculated runtime: %d", actualRunTimeSeconds);
|
||||
report_error("Known Subsurface runtime: %d", knownSsrfRunTimeSeconds);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue