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

1
test/functional/storage/SylvanDdTest.cpp

@ -291,7 +291,6 @@ TEST(SylvanDd, AddIteratorTest) {
ASSERT_NO_THROW(ite = dd.end()); ASSERT_NO_THROW(ite = dd.end());
std::pair<storm::expressions::SimpleValuation, double> valuationValuePair; std::pair<storm::expressions::SimpleValuation, double> valuationValuePair;
uint_fast64_t numberOfValuations = 0; uint_fast64_t numberOfValuations = 0;
dd.exportToDot("dd.dot");
while (it != ite) { while (it != ite) {
ASSERT_NO_THROW(valuationValuePair = *it); ASSERT_NO_THROW(valuationValuePair = *it);
ASSERT_NO_THROW(++it); ASSERT_NO_THROW(++it);

Loading…
Cancel
Save