Skip to content

Commit

Permalink
Merge branch 'develop' into mock-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
felixschurk authored Feb 27, 2024
2 parents 1281e86 + 8ddca89 commit ccc3164
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/integration/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

int main(int argc, char **argv) {
const std::string FILENAME{argv[1]};
const std::string FILENAME_OUTPUT{argv[2]};

// read into to config file
auto configFile = std::make_unique<SimpleConfigFile>();
Expand All @@ -23,10 +22,17 @@ int main(int argc, char **argv) {

parser->parse(output_pair);

std::ofstream OutputFile (FILENAME_OUTPUT);
for (auto const &str: output_pair.first) {
if (argv[2] != nullptr){
const std::string FILENAME_OUTPUT{argv[2]};
std::ofstream OutputFile (FILENAME_OUTPUT);
for (auto const &str: output_pair.first) {
OutputFile << str << std::endl;
}
OutputFile.close();
}

OutputFile.close();
}
else{
for (auto const &str: output_pair.first) {
std::cout << str << std::endl;
}
}
}

0 comments on commit ccc3164

Please sign in to comment.