test case for fuchs/muelbach
This commit is contained in:
parent
1c6c9f934d
commit
b05950fc37
@ -732,16 +732,16 @@ int main() {
|
|||||||
if (isParsed) {
|
if (isParsed) {
|
||||||
PermitType permitType(PERMIT_TYPE::SHORT_TERM_PARKING);
|
PermitType permitType(PERMIT_TYPE::SHORT_TERM_PARKING);
|
||||||
|
|
||||||
pop_min_time = get_minimal_parkingtime(&cfg, permitType);
|
//pop_min_time = get_minimal_parkingtime(&cfg, permitType);
|
||||||
pop_max_time = get_maximal_parkingtime(&cfg, permitType);
|
//pop_max_time = get_maximal_parkingtime(&cfg, permitType);
|
||||||
pop_min_price = get_minimal_parkingprice(&cfg, permitType);
|
//pop_min_price = get_minimal_parkingprice(&cfg, permitType);
|
||||||
pop_max_price = get_maximal_parkingprice(&cfg, permitType);
|
//pop_max_price = get_maximal_parkingprice(&cfg, permitType);
|
||||||
pop_daily_card_price = cfg.getPaymentOptions().pop_daily_card_price;
|
//pop_daily_card_price = cfg.getPaymentOptions().pop_daily_card_price;
|
||||||
|
|
||||||
qCritical() << " pop_min_time: " << pop_min_time;
|
//qCritical() << " pop_min_time: " << pop_min_time;
|
||||||
qCritical() << " pop_max_time: " << pop_max_time;
|
//qCritical() << " pop_max_time: " << pop_max_time;
|
||||||
qCritical() << " pop_min_price: " << pop_min_price;
|
//qCritical() << " pop_min_price: " << pop_min_price;
|
||||||
qCritical() << " pop_max_price: " << pop_max_price;
|
//qCritical() << " pop_max_price: " << pop_max_price;
|
||||||
|
|
||||||
CalcState cs;
|
CalcState cs;
|
||||||
double cost;
|
double cost;
|
||||||
@ -749,8 +749,8 @@ int main() {
|
|||||||
int offsetInMinutes = 0;
|
int offsetInMinutes = 0;
|
||||||
|
|
||||||
// for (int day = Qt::Monday; day <= Qt::Sunday; ++day) {
|
// for (int day = Qt::Monday; day <= Qt::Sunday; ++day) {
|
||||||
for (int day = Qt::Monday; day <= Qt::Monday; ++day) {
|
for (int day = Qt::Wednesday; day <= Qt::Wednesday; ++day) {
|
||||||
QDateTime s(QDate(2024, 7, 21 + day), QTime(0, 0, 0));
|
QDateTime s(QDate(2024, 8, 11 + day), QTime(0, 0, 0));
|
||||||
QDateTime end;
|
QDateTime end;
|
||||||
|
|
||||||
switch (day) {
|
switch (day) {
|
||||||
@ -778,7 +778,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//for (int minutes = 0; minutes < 1440; ++minutes) {
|
//for (int minutes = 0; minutes < 1440; ++minutes) {
|
||||||
for (int minutes = 420; minutes <= 420; minutes += 1) {
|
for (int minutes = 491; minutes <= 491; minutes += 1) {
|
||||||
QDateTime start = s.addSecs(minutes * 60);
|
QDateTime start = s.addSecs(minutes * 60);
|
||||||
|
|
||||||
//qCritical() << "start" << start.toString(Qt::ISODate);
|
//qCritical() << "start" << start.toString(Qt::ISODate);
|
||||||
@ -797,7 +797,7 @@ int main() {
|
|||||||
effectiveStart.setTime(QTime(7, 0, 0)); // next day
|
effectiveStart.setTime(QTime(7, 0, 0)); // next day
|
||||||
}
|
}
|
||||||
|
|
||||||
// #if 0
|
#if 0
|
||||||
qCritical() << "";
|
qCritical() << "";
|
||||||
qCritical() << "compute_duration_for_parking_ticket";
|
qCritical() << "compute_duration_for_parking_ticket";
|
||||||
qCritical() << "===================================";
|
qCritical() << "===================================";
|
||||||
@ -818,12 +818,12 @@ int main() {
|
|||||||
<< "> end" << end.toString(Qt::ISODate);
|
<< "> end" << end.toString(Qt::ISODate);
|
||||||
|
|
||||||
}
|
}
|
||||||
// #else
|
#else
|
||||||
qCritical() << "";
|
qCritical() << "";
|
||||||
qCritical() << "compute_price_for_parking_ticket";
|
qCritical() << "compute_price_for_parking_ticket";
|
||||||
qCritical() << "================================";
|
qCritical() << "================================";
|
||||||
|
|
||||||
for (int netto_parking_time = 180; netto_parking_time <= (180 + 720*3); netto_parking_time += 36) {
|
for (int netto_parking_time = 180; netto_parking_time <= (180 + 720*3); netto_parking_time += 720) {
|
||||||
QDateTime end;
|
QDateTime end;
|
||||||
struct price_t price;
|
struct price_t price;
|
||||||
cs = compute_price_for_parking_ticket(&cfg, start, netto_parking_time, end, &price, permitType, true);
|
cs = compute_price_for_parking_ticket(&cfg, start, netto_parking_time, end, &price, permitType, true);
|
||||||
@ -831,7 +831,7 @@ int main() {
|
|||||||
qCritical() << "start" << start.toString(Qt::ISODate) << "end" << end.toString(Qt::ISODate)
|
qCritical() << "start" << start.toString(Qt::ISODate) << "end" << end.toString(Qt::ISODate)
|
||||||
<< "price" << price.netto;
|
<< "price" << price.netto;
|
||||||
}
|
}
|
||||||
// #endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user