Browse Source

added conversion methods for ShieldGenerationSmgRpatlModelCheckerTest.cpp

tempestpy_adaptions
Lukas Posch 3 years ago
committed by Stefan Pranger
parent
commit
4925135f87
  1. 18
      src/test/storm/modelchecker/rpatl/smg/ShieldGenerationSmgRpatlModelCheckerTest.cpp

18
src/test/storm/modelchecker/rpatl/smg/ShieldGenerationSmgRpatlModelCheckerTest.cpp

@ -56,8 +56,26 @@ namespace {
ValueType parseNumber(std::string const& input) const { return storm::utility::convertNumber<ValueType>(input);} ValueType parseNumber(std::string const& input) const { return storm::utility::convertNumber<ValueType>(input);}
void convertShieldingFileToString(std::string filename, std::string &shieldingString) {
filename += shieldEnding;
std::ifstream resultFile(filename);
std::stringstream resultBuffer;
resultBuffer << resultFile.rdbuf();
shieldingString = resultBuffer.str();
}
void getStringsToCompare(std::string filename, std::string &shieldingString, std::string &compareFileString) {
this->convertShieldingFileToString(filename, shieldingString);
std::string compareFileName = STORM_TEST_RESOURCES_DIR "/smg-shields/" + filename;
this->convertShieldingFileToString(compareFileName, compareFileString);
filename += shieldEnding;
std::remove(filename.c_str());
}
private: private:
storm::Environment _environment; storm::Environment _environment;
std::string shieldEnding = ".shield";
}; };
typedef ::testing::Types< typedef ::testing::Types<

Loading…
Cancel
Save