kirchdorf: getDurationFromCost(): to be tested

This commit is contained in:
2024-02-27 17:11:00 +01:00
parent abbbd06f93
commit 7831329b11
2 changed files with 335 additions and 114 deletions

View File

@@ -269,17 +269,20 @@ int main() {
QList<int>::const_iterator step;
for (step = steps.cbegin(); step != steps.cend(); ++step) {
qCritical() << QString("*** NEXT STEP: %1 ***").arg(*step);
for (int offset = 7*60; offset < 18*60; ++offset) {
//for (int offset = 691; offset < 692; ++offset) {
for (int offset = 480; offset < 1080; ++offset) {
//for (int offset = 7*60; offset < (18*60)-90; ++offset) {
//for (int offset = (18*60)-90; offset < 18*60; ++offset) {
//for (int offset = 1046; offset < 1047; ++offset) {
QDateTime start = s.addSecs(offset * 60);
QDateTime const firstStart = start;
//if (*step != 35) continue;
if (*step != 30) continue;
double cost = 0;
if (compute_price_for_parking_ticket(&cfg, start, *step, end, &price)) {
double cost = price.netto;
cost = price.netto;
qCritical() << "****" << offset << *step << "****";
qCritical() << " firstStart :" << firstStart.toString(Qt::ISODate);
@@ -424,6 +427,12 @@ int main() {
return -1;
}
if (compute_duration_for_parking_ticket(&cfg, start, cost, end)) { // return value
qCritical() << "XXXX start" << start.toString(Qt::ISODate)
<< "offset" << offset
<< "cost" << cost
<< "end" << end.toString(Qt::ISODate);
}
}
}
}