fixed a bug that returned the wrong grid to the test method

This commit is contained in:
philippun 2023-08-02 13:19:33 +02:00
parent 78cf41f57e
commit 85c5e55601
3 changed files with 7 additions and 7 deletions

View File

@ -103,11 +103,11 @@ class Simulation {
void printConcentrationsCSV(string filename); void printConcentrationsCSV(string filename);
/** /**
* @brief Start the simulation with all of the previously set parameters. * @brief
* *
* @return auto * @return Grid
*/ */
void run(); Grid run();
private: private:

View File

@ -146,7 +146,7 @@ void Simulation::printConcentrationsCSV(string filename) {
file.close(); file.close();
} }
void Simulation::run() { Grid Simulation::run() {
string filename; string filename;
if (this->console_output > CONSOLE_OUTPUT_OFF) { if (this->console_output > CONSOLE_OUTPUT_OFF) {
printConcentrationsConsole(); printConcentrationsConsole();
@ -191,4 +191,6 @@ void Simulation::run() {
if (this->csv_output > CSV_OUTPUT_OFF) { if (this->csv_output > CSV_OUTPUT_OFF) {
printConcentrationsCSV(filename); printConcentrationsCSV(filename);
} }
return grid;
} }

View File

@ -50,9 +50,7 @@ static Grid setupSimulation() {
// RUN // RUN
sim.run(); return sim.run();
return grid;
} }
TEST_CASE("equality to reference matrix") { TEST_CASE("equality to reference matrix") {