Minor: small changes for tests of SCHOENAU

This commit is contained in:
Gerhard Hoffmann 2024-04-24 09:54:29 +02:00
parent 3b813e5eff
commit 76bb1eb56a

View File

@ -35,7 +35,7 @@ extern "C" char* strptime(const char* s,
#include "calculate_price.h" #include "calculate_price.h"
#define SZEGED (0) #define SZEGED (0)
#define SCHOENAU_KOENIGSEE (0) #define SCHOENAU_KOENIGSEE (1)
#define NEUHAUSER_KORNEUBURG (0) #define NEUHAUSER_KORNEUBURG (0)
#define NEUHAUSER_LINSINGER_MASCHINENBAU (0) #define NEUHAUSER_LINSINGER_MASCHINENBAU (0)
#define NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM (0) #define NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM (0)
@ -43,7 +43,7 @@ extern "C" char* strptime(const char* s,
#define NEUHAUSER_KIRCHDORF (0) #define NEUHAUSER_KIRCHDORF (0)
#define BAD_NEUENAHR_AHRWEILER (0) #define BAD_NEUENAHR_AHRWEILER (0)
#define NEUHAUSER_CHRISTOPH_REISEN (0) #define NEUHAUSER_CHRISTOPH_REISEN (0)
#define NEUHAUSER_PERNEGG_AN_DER_MUR (1) #define NEUHAUSER_PERNEGG_AN_DER_MUR (0)
int main() { int main() {
#if NEUHAUSER_PERNEGG_AN_DER_MUR==1 #if NEUHAUSER_PERNEGG_AN_DER_MUR==1
@ -475,10 +475,19 @@ int main() {
#endif #endif
#if SCHOENAU_KOENIGSEE==1 #if SCHOENAU_KOENIGSEE==1
//QString f("/opt/ptu5/opt/customer_332/etc/psa_tariff/tariff01.json"); for (int zone=1; zone < 3; ++zone) {
QString f("/opt/ptu5/opt/customer_332/etc/psa_tariff/tariff02.json"); std::ifstream input;
std::ifstream input(f.toUtf8().constData()); if (zone == 1) {
input.open("/opt/ptu5/opt/customer_332/etc/psa_tariff/tariff01.json");
}
if (zone == 2) {
input.open("/opt/ptu5/opt/customer_332/etc/psa_tariff/tariff02.json");
}
qCritical() << "--------------------";
qCritical() << " ZONE" << zone;
qCritical() << "--------------------";
std::stringstream sstr; std::stringstream sstr;
while(input >> sstr.rdbuf()); while(input >> sstr.rdbuf());
@ -490,7 +499,7 @@ int main() {
cout << endl; cout << endl;
if (isParsed) { if (isParsed) {
qCritical() << "parsed" << f; // qCritical() << "parsed zone" << zone << "file";
int minParkingTime = get_minimal_parkingtime(&cfg); int minParkingTime = get_minimal_parkingtime(&cfg);
qCritical() << "minimal_parking_time" << minParkingTime; qCritical() << "minimal_parking_time" << minParkingTime;
@ -515,6 +524,7 @@ int main() {
<< "price=" << price; << "price=" << price;
} }
} }
}
#endif #endif
#if NEUHAUSER_KIRCHDORF==1 #if NEUHAUSER_KIRCHDORF==1