Browse Source

removed debug output in test and delete dylib if building fails

Former-commit-id: 0f6a0a8c2c [formerly 2a2ca2ac40]
Former-commit-id: 8e841483d1
tempestpy_adaptions
dehnert 8 years ago
parent
commit
df9ff5dfdb
  1. 6
      src/builder/jit/ExplicitJitJaniModelBuilder.cpp
  2. 3
      test/functional/storage/SylvanDdTest.cpp

6
src/builder/jit/ExplicitJitJaniModelBuilder.cpp

@ -519,19 +519,23 @@ namespace storm {
auto start = std::chrono::high_resolution_clock::now();
std::shared_ptr<storm::models::sparse::Model<ValueType, storm::models::sparse::StandardRewardModel<ValueType>>> sparseModel(nullptr);
boost::optional<std::string> error;
try {
sparseModel = std::shared_ptr<storm::models::sparse::Model<ValueType, storm::models::sparse::StandardRewardModel<ValueType>>>(builder->build());
STORM_LOG_THROW(sparseModel, storm::exceptions::UnexpectedException, "An unexpected error occurred.");
STORM_LOG_TRACE("Successfully got model from jit-builder.");
} catch (std::exception const& e) {
STORM_LOG_THROW(false, storm::exceptions::WrongFormatException, "Model building failed. Reason: " << e.what());
error = e.what();
}
auto end = std::chrono::high_resolution_clock::now();
STORM_LOG_TRACE("Building model took " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << "ms.");
// (7) Delete the shared library.
boost::filesystem::remove(dynamicLibraryPath);
STORM_LOG_THROW(!error, storm::exceptions::WrongFormatException, "Model building failed. Reason: " << error.get());
// Return the constructed model.
return sparseModel;
}

3
test/functional/storage/SylvanDdTest.cpp

@ -291,7 +291,6 @@ TEST(SylvanDd, AddIteratorTest) {
ASSERT_NO_THROW(ite = dd.end());
std::pair<storm::expressions::SimpleValuation, double> valuationValuePair;
uint_fast64_t numberOfValuations = 0;
dd.exportToDot("dd.dot");
while (it != ite) {
ASSERT_NO_THROW(valuationValuePair = *it);
ASSERT_NO_THROW(++it);
@ -411,4 +410,4 @@ TEST(SylvanDd, BddOddTest) {
EXPECT_EQ(9ul, matrix.getRowGroupCount());
EXPECT_EQ(9ul, matrix.getColumnCount());
EXPECT_EQ(106ul, matrix.getNonzeroEntryCount());
}
}
Loading…
Cancel
Save