Skip to content

Commit

Permalink
Cleaned up debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeByDrescher committed Jan 26, 2024
1 parent f243f86 commit 7be1b2d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Stochastic/Tests/statstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ const std::map<int, double> expected_S0 = {
};

TEST(statstest,test1) {
std::cout << "Checkpoint 0" << std::endl;
std::string inputFileName = std::tmpnam(nullptr);
std::string outputFileName = std::tmpnam(nullptr);
std::map<int,double> results;
Expand All @@ -117,23 +116,17 @@ TEST(statstest,test1) {
}

// Setup the Gibson Solver input file
std::cout << "Checkpoint 1" << std::endl;
std::cout << " >> " << "Input: <" << inputFileName << ">;"<< std::endl;
std::cout << " >> " << "Output: <" << outputFileName << ">;"<< std::endl;
if (outputFileStream.is_open()) outputFileStream.close();
inputFileStream << input_file_contents;
inputFileStream.close();

// Create the Gibson Solver
std::cout << "Checkpoint 2" << std::endl;
auto *gb = new Gibson(inputFileName.c_str(), outputFileName.c_str());

// Launch the test
std::cout << "Checkpoint 3" << std::endl;
gb->march();

// Verify file contents
std::cout << "Checkpoint 4" << std::endl;
outputFileStream.open(outputFileName, fstream::in);
std::string line;
std::getline(outputFileStream, line); // remove header line
Expand All @@ -151,7 +144,6 @@ TEST(statstest,test1) {
outputFileStream.close();

// compare the expected and actual values
std::cout << "Checkpoint 5" << std::endl;
double accumulatedError = 0.0, maxIndividualError = 0.0;
for (auto const& expected : expected_S0){
double absoluteError = std::abs(expected.second - results[expected.first]);
Expand Down

0 comments on commit 7be1b2d

Please sign in to comment.